Skip to content
Advertisement

Joining two rows into one rows (different column) in oracle

I have table with values like this

I want to re-arrange the table using select script to:

I’ve tried nested case when, but it always create one column with Product-name followed by 0 value besides and repeated.

Thank You

Advertisement

Answer

You want aggregation :

Run the aggregation query whenever is needed, do not create summary table structure in the database. It will be difficult to manage.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement