0
0
I have a table that has three columns: ID, Date, Group. There are two rows for each unique ID (where Group = 1 or where Group = 2). How can I combine these into a table with one row per ID and the Date values sorted into two columns?
I have:
ID Date Group
123456 12/7/2016 1
123456 12/3/2016 2
789654 11/8/2016 1
789654 12/1/2016 2
I want:
ID Date1 Date2
123456 12/7/2016 12/3/2016
789654 11/8/2016 12/1/2016
This is for Sybase 12, if that matters.
Thanks. And yeah, your assumption is correct. I'll accept your answer after I give it a whirl this Friday. – picobit – 2016-12-07T23:53:29.273
Thanks, I used the first method. Didn't try the second. Joining twice seems so obvious now... – picobit – 2016-12-08T19:07:50.410