July 28, 2016 at 1:17 pm
I have the following data in a table1
record_id, colname, beforeval , afterval
1,col2,'JOHN' null
1 col2, null, 'JOE'
2, col2 'JANE', null
2 , col2 null, 'JANIE'
I want the result as follows in one row
1, col2, JOHN, JOE
2, col2, JANE, JANIE
Any help would be greatly appreciated.
July 28, 2016 at 1:36 pm
Why does record_id 2 ends up with value 'col1' for colname?
Have you tried using MAX() and MIN() to aggregate rows?
July 28, 2016 at 1:37 pm
Luis Cazares (7/28/2016)
Why does record_id 2 ends up with value 'col1' for colname?Have you tried using MAX() and MIN() to aggregate rows?
Sorry typo
It's col2 for all.
July 28, 2016 at 2:05 pm
July 29, 2016 at 7:24 am
Luis Cazares (7/28/2016)
So, are you good now?
Yes, thanks for checking. When you mentioned Max it pointed me to the right direction.
Thanks
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply