D
Dorian
I have a table containing 2 types of record, the type indicated by a certain
column.
There will always be only one record of each type with a common key.
I need to create a query where I combine each pair of rows into a single row.
E.g.
Key 001 Type A 250.00
Key 001 Type B 100.00
Key 002 Type A 125.00
Key 002 Type B 333.00
I need to return 2 rows:
Key 001 A=250 B=100
Key 002 A=125 B=333
How would I do this in a single select statement? I cannot use Transform or
Pivot as this is being run against an Oracle table. I can only use standard
SQL. Thanks.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
column.
There will always be only one record of each type with a common key.
I need to create a query where I combine each pair of rows into a single row.
E.g.
Key 001 Type A 250.00
Key 001 Type B 100.00
Key 002 Type A 125.00
Key 002 Type B 333.00
I need to return 2 rows:
Key 001 A=250 B=100
Key 002 A=125 B=333
How would I do this in a single select statement? I cannot use Transform or
Pivot as this is being run against an Oracle table. I can only use standard
SQL. Thanks.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".