I'm looking to write a record or each day of a month(or date range)
I have a query that gets a name, and ID and write it to a temp table
I'd like to generate output with record for each date in the date range
example
I write a temp table with
JimJames 901111
Marymaples 90891
*************************************
I'd like output of
1/1/23 JimJames 90111
1/2/23 JimJames 90111
1/3/23 JimJames 90111.....
1/31/23 JimJames 90111
1/1/23 Marymaples 90891
1/2/23 Marymaples 90891
1/3/23 Marymaples 90891.....
1/31/23 Marymaples 90891.....
Any ideas would be very much appreciated....
Thnaks
Joe
Does this thread help?
https://www.sqlservercentral.com/forums/topic/how-do-i-write-a-record-for-each-day-in-a-date-range
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
February 28, 2023 at 9:38 pm
Thank You Michael,
The saddest part of the answer is I submitted the question 5 years ago!!! LOL!!!!
Shows how long I haven't used it...
Thanks Again
February 28, 2023 at 10:58 pm
Thank You Michael,
The saddest part of the answer is I submitted the question 5 years ago!!! LOL!!!!
Shows how long I haven't used it...
Thanks Again
I recommend that you don't make the same mistake that you made on that old thread. 😉 You posted the code you said you ended up using and I posted as to why that wasn't a good idea.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 28, 2023 at 11:45 pm
I see ur point, but wouldn't I be safe if I ran it thru something like Ssrs using a date parameter?
March 1, 2023 at 1:33 am
I see ur point, but wouldn't I be safe if I ran it thru something like Ssrs using a date parameter?
In a word, No. There are much better ways to do it.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply