Viewing 15 posts - 391 through 405 (of 4,080 total)
I can't either. Glad you finally got it to work.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 8, 2016 at 11:56 am
While we are still old school then, I think Cross Applying a VALUES clause is a great trick. Very clean and powerful alternative to UNPIVOT.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 8, 2016 at 11:49 am
Lynn Pettis (8/8/2016)
The Dixie Flatline (8/8/2016)
https://technet.microsoft.com/en-us/library/ms177443(v=sql.105).aspxMake it easier:
https://technet.microsoft.com/en-us/library/ms177443(v=sql.105).aspx
😛
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 8, 2016 at 11:46 am
I don't get that error message with the sample data you supplied. If your test data has more than one date within the range, you have to...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 8, 2016 at 6:11 am
https://technet.microsoft.com/en-us/library/ms177443(v=sql.105).aspx
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 8, 2016 at 5:54 am
Are you trying to sum up the amount of all rows between a range? If so, you need to use the SUM() function in your subquery.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 8, 2016 at 5:46 am
Any chance of changing the input to make that ["fishing"]?
The error message is that the input is not properly formatted. Making it a one-element array fixes the problem.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 7, 2016 at 8:18 pm
Here's how the line in question should read.
WHEN CAST(GETDATE() AS DATE) BETWEEN CAST([StartDate] AS DATE) AND CAST([EndDate] AS DATE)
The key is that [StartDate] comes before [EndDate]. ...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 7, 2016 at 7:54 pm
Sorry for the drama guys. Totally my fault.
I vaguely remember a similar debate about this many years ago. The purpose of these forums are to...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 7, 2016 at 2:55 pm
Eirikur Eiriksson (8/6/2016)
The Dixie Flatline (8/6/2016)
Answer withdrawn because I prefer not to answer interview questions.Just curious, how do you determine that this is an interview question?
😎
I don't know it for...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 6, 2016 at 8:36 pm
I just realized you posted 3 questions in 30 minutes. These aren't interview questions are they?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 6, 2016 at 8:53 am
Answer withdrawn because I prefer not to answer interview questions.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 6, 2016 at 8:42 am
Could you please at least give an example of what the result should be?
Don't explain it in words, draw us a picture.
Create a result table and populate it with...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 6, 2016 at 8:26 am
Answer withdrawn because I prefer not to help people with interview questions.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 6, 2016 at 8:18 am
Here is another variation that might perform better, depending on the production volume and the existence of a clustered index on the [Seq] column. ( If the...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 6, 2016 at 1:34 am
Viewing 15 posts - 391 through 405 (of 4,080 total)