Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to merge multiple rows into one row? not transposing the multiple rows

3261581Jul 20 2016 — edited Jul 22 2016
multiple
column1column2column3column4key1key2
0000758206[null]Y[null]1111122222
0000758206N[null][null]1111122222
merged
column1column2column3column4key1key2
0000758206NY[null]1111122222

Hello all,

I have a query generate multiple rows by the columns key1 and key2.  Is there a way to merge the multiple row into one?  basically all the nulls should be replaced by non-nulls.  If multiple rows contain nulls for the same row (like column4), then keep the null.

Please shed some lights on this, I have little clue how to go about this.

thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2016
Added on Jul 20 2016
11 comments
3,151 views