August 31, 2018 at 12:27 pm
I appreciate your help on the end of month.
I am trying but failing at augmenting the code to break down the difference between start and end date by individual days. Currently, breaks down by month end of each month in respective range.
Thank you again.
-Alex
August 31, 2018 at 12:29 pm
I think i figured it out. I was only changing the dayadd formula in the select to 'day'. Just changed the datediff in the cross apply and i think it did it.
Is it that simple?
August 31, 2018 at 12:31 pm
Caps out at 100 rows where there should be more? this i would def hope to get your input on
Thank you for your help and for being so patient with me.
August 31, 2018 at 8:42 pm
alexander.lummer - Friday, August 31, 2018 12:31 PMCaps out at 100 rows where there should be more? this i would def hope to get your input onThank you for your help and for being so patient with me.
It sounds like you're still using a recursive CTE to generate dates. Is that true? Yeah, there's a fix to get past 100 with recursive CTEs but using a recursive CTE for such a thing is (and there's no other word for it) stupid. It's a totally unnecessary waste of logical reads, CPU, and duration even for wicked small stuff.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply