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!

Multiple rows to one row

as maApr 18 2025

Hi All,

I have data as below in my table and my need is to show the quantity in same row instead of two rows.

WITH t AS ( SELECT - 1 trx_id
, 1 quantity
, 'RECIVE' action
FROM dual
UNION
SELECT 123
, 1
, 'DELIVER'
FROM dual
)
SELECT *
FROM t;

The receive trx id is always -1 as it is systematic.

received_quantity deliver_quantity

1 1

Comments
Post Details
Added on Apr 18 2025
3 comments
158 views