I have a record with the following fields:
id1, id2, id3, id4, price1, price2, price3, price4
I would like to write a SELECT statement in order to get 4 records:
id, price (record that comes from id1 and price 1)
id, price (record that comes from id2 and price 2)
id, price (record that comes
JORGE MALDONADO jorgemal1...@gmail.com hat am 24. Dezember 2012 um 17:30
geschrieben:
I have a record with the following fields:
id1, id2, id3, id4, price1, price2, price3, price4
I would like to write a SELECT statement in order to get 4 records:
id, price (record that comes from id1 and
hello,
( select 'A' as x, id, price from tab where id = 'value'
union all select 'B' as x, id, ...
union all select 'C' as x, id, ...
union all select 'D' as x, id, price from tab where id = 'value' )
generate a list like
X id price
A 1 10
B 2 20
C 3 30
D 4 40
select