Viewing 15 posts - 3,391 through 3,405 (of 5,590 total)
Jim-720070 (9/2/2010)
Thanks for your help!
Dan, The problem is that for each ID I want every day of the month (or selected time period). So because there are three ID's...
September 2, 2010 at 10:41 am
mfowler12 (9/2/2010)
So, how do I link the tables so that the data can be...
September 2, 2010 at 10:17 am
David Burrows (9/2/2010)
WayneS (9/2/2010)
Bezan,David's solution rocks. Just use that.
Thanks Wayne :blush:
Not sure that it rocks, might need a bit of fine tuning 🙂
The only area of improvement that I can...
September 2, 2010 at 9:48 am
Check the registry. On my system, it's located at:
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\100\Tools\ClientSetup, and the key is SQLToolsPath.
September 2, 2010 at 9:39 am
Does this get you what you're looking for?
SELECT dti.Dat_Date, i.In_ID
FROM (
SELECT *
...
September 2, 2010 at 9:36 am
To see the value of any variable, just select @variable.
To see the contents of temp tables, just select * from #temptable.
Of course, this will need to be done within the...
September 2, 2010 at 8:30 am
I would suggest adding a "select @ExistingID" to the end of your code, and see what you get.
September 2, 2010 at 8:14 am
Bezan,
David's solution rocks. Just use that.
September 2, 2010 at 8:11 am
Click here for the latest Delimited Split Function.
Then, it's just:
SELECT ITEM
FROM dbo.DelimitedSplit8k(@val, ',')
September 2, 2010 at 8:10 am
David Burrows (9/2/2010)
Here's my attempt at a solution
Whoa... VERY NICE!
Edit: I really like using the dates in the case statements... kinda obvious when you see it.
September 2, 2010 at 8:00 am
Bezan,
I've really enjoyed this exercise. It's nice to see someone that isn't posting "do it all for me" - you are working the problem, reading what is being suggested, implementing...
September 2, 2010 at 7:50 am
I just modified it to combine all the sql generation that runs against the tally table to run in just one select statement - reducing the # of reads against...
September 2, 2010 at 7:46 am
Bezan (9/2/2010)
September 2, 2010 at 7:34 am
irobertson (9/2/2010)
Interestingly, as I increase the amount of data in the table, the number of logical reads on the cte solution increases. Any idea why?
Yes - you're calling CTE2 5...
September 2, 2010 at 7:25 am
LightVader (9/2/2010)
Derrick Smith (9/1/2010)
September 2, 2010 at 7:22 am
Viewing 15 posts - 3,391 through 3,405 (of 5,590 total)