Viewing 15 posts - 5,266 through 5,280 (of 8,731 total)
DaveK2014 (2/3/2015)
So using your first two lines which are the same as mine I am getting a Invalid length parameter passed to the right function.
After adding another possibility, I found...
February 3, 2015 at 5:03 pm
I don't get any error, I'm not sure if I was supposed to get one.
Here's my test along with alternative methods.
WITH SampleData AS(
SELECT 'Luis Cazares' AS...
February 3, 2015 at 4:17 pm
Have you considered using a calendar table to join with the date ranges and use COUNT() grouping by account, location and month? Do you need an example?
February 3, 2015 at 1:48 pm
To get dynamic calculations on dates, you can use the DATEADD() function.
Remember that when using BETWEEN, the lower value goes first or you'll get a non-valid range with no error...
February 3, 2015 at 1:09 pm
That's good to know. As I'm basically a developer, I'm not used to work on admin tasks.
Thank you, Lowell.
February 3, 2015 at 10:31 am
pharmkittie (1/29/2015)
dwain.c and mister magoo: Thank you! I will try...
January 30, 2015 at 11:16 am
asm1212 (1/30/2015)
Luis, or someone else, I am a fellow DBA but I have not seen this before! If it is not too much to ask, can you just kind of...
January 30, 2015 at 11:03 am
Are you seriously creating the same stored procedures for each quarter? I don't want to imagine what would happen if you need a daily report.
January 29, 2015 at 5:37 pm
Just to give both options together to compare them. The first version including all the remainder in the first month and the second version putting an extra cent per month.
ALTER...
January 29, 2015 at 3:47 pm
Maybe something like this. If you change/remove the third parameter of round() you'll get different results. This will always return the first payment equal or greater than all the other...
January 29, 2015 at 1:41 pm
SpeedSkaterFan (1/29/2015)
Luis, Sorry for not replying to your thread yesterday.Timedifferences between the Netherlands and Mexico ...
That's totally understandable, don't worry.
SpeedSkaterFan (1/29/2015)
January 29, 2015 at 12:28 pm
Tweaking Alan's code, I can reduce the reads by half by reducing the length of the code. 🙂
WITH uqvals AS
(
SELECT ID,
MIN(DateOpen) DateOpen,
...
January 29, 2015 at 11:56 am
This article will help you to obtain the desired result.
http://www.sqlservercentral.com/articles/comma+separated+list/71700/
January 29, 2015 at 9:57 am
It's because your varchar column is being implicitly converted to a numeric(4,0) as stated on the data type precedences. SQL Server does implicit conversions because it can't compare apples with...
January 28, 2015 at 6:58 pm
I'm not sure that I understand the second parameter. This is what I've made.
Note that I changed the scalar function into an InLine Table-valued function. To know why, read the...
January 28, 2015 at 2:08 pm
Viewing 15 posts - 5,266 through 5,280 (of 8,731 total)