Viewing 15 posts - 4,576 through 4,590 (of 59,069 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.
Heh... one good test result is worth a thousand expert opinions. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
Ok. So what in the code uniquely identifies that code and ONLY that code? Which DB_ID does it run against? What is the USER_ID the code from the front...
--Jeff Moden
Change is inevitable... Change for the better is not.
Sure, it's above; I posted it years ago, when this q was first asked.
Actually I should adjust it again, you only need to calc the very first Friday, from...
--Jeff Moden
Change is inevitable... Change for the better is not.
Is it a stored procedure or ad hoc code or ???
--Jeff Moden
Change is inevitable... Change for the better is not.
Heh... keeping with the spirit of the question... 😉
Results;
--Jeff Moden
Change is inevitable... Change for the better is not.
Welp then start adding columns one by one until it breaks 🙂
Good lesson on basic troubleshooting. Sorry I almost screwed that all up with my post about desk checking.
--Jeff Moden
Change is inevitable... Change for the better is not.
I'm needing to convert some varchar figures to decimal for sums, but can't quite find an example that works... the second block of code just returns the list of...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 15 posts - 4,576 through 4,590 (of 59,069 total)