Convert rows to columns
am 05.04.2008 17:25:35 von fbpriveDear All,
I want a list of selected orders and the orderproperties as columns
but the properties are stored as row in table ORDER_PROPERTY (only 1
row per order !)
Table: ORDER: ORD_ID, ORD_CLIENTCODE, etc
Table: PROERTY: PRP_ID, PRP_NAME, etc > don't think I need this table
for my view or SP.
Table: ORDER_PROPERTY: OP_ORD_ID, OP_PRP_ID, OP_VALUE
I want a resultset like this ( property-values from 211 till 220 and
if not related show 0 or null)
ORD_ID ORD_CLIENTCODE OP_VALUE ( propertyID=211)
OP_VALUE ( propertyID=212)
1 ab235468
11111 2222
2 ab124578
0 1234
3 ab123654
12365 0
4 ab321456
0 0
5 ab365489
45645 22
Thanks,
Fluppe