Viewing 15 posts - 4,606 through 4,620 (of 59,101 total)
I agree that a "Best Practice" to prevent recompiles would be to move the creation of the temp tables to the very beginning but that's not likely to make a...
--Jeff Moden
Change is inevitable... Change for the better is not.
p.s. I hate the double spacing this forum does with code. It makes even well formatted code look like junk.
--Jeff Moden
Change is inevitable... Change for the better is not.
Over the years, and especially this last 18 months, it seems like the problem of calculating the Nth Occurrence of some weekday has come up over and over. It always...
--Jeff Moden
Change is inevitable... Change for the better is not.
I tested it with a couple of different DATEFIRST settings. It appears to work correctly now.
--Jeff Moden
Change is inevitable... Change for the better is not.
Thank you very much for the valuable feedback. So does my suggestion to add more data files to TempDb sound reasonable then?
To me... no. Even if you do that...
--Jeff Moden
Change is inevitable... Change for the better is not.
Ya know... the very least you could do is run that code through a decent formatter to get proper indentation the help with readability.
While I'm sure it's not the whole...
--Jeff Moden
Change is inevitable... Change for the better is not.
I've amended your code. I think this should be a few times faster as it removes the need for a tally of 7 week days and just calculates...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 15 posts - 4,606 through 4,620 (of 59,101 total)