GBeezy
SSCarpal Tunnel
Points: 4723
More actions
March 21, 2022 at 5:26 pm
#4003596
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?
wburke 85918
SSChasing Mays
Points: 619
March 21, 2022 at 5:35 pm
#4003599
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
jschmidt 17654
SSCommitted
Points: 1663
April 4, 2022 at 4:48 pm
#4010610
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
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply