March 21, 2022 at 5:26 pm
I have a temp table that returns the following:
Month Year
09 2021
12 2021
And, I was the following returned: 09-12-2021.
Is this possible?
March 21, 2022 at 5:35 pm
Are you sure it sounds like you want "9-12 2021" as in September-December 2021.
Select MIN(Month), '-',MAX(Month), Year
or
SELECT Select MIN(Month), '-',MAX(Month), '-' Year
April 4, 2022 at 5:17 am
This was removed by the editor as SPAM
April 4, 2022 at 5:17 am
This was removed by the editor as SPAM
April 4, 2022 at 4:48 pm
I'd try a Lead or Lag with a partition by Year if you are on SQL 2012 or newer.
April 25, 2022 at 8:54 am
This was removed by the editor as SPAM
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply