LeeFarrant
Technical User
I have a table which is in the following format
CUSTID SUBID
Customer1 Subscriber1
Customer1 Subscriber2
Customer1 Subscriber3
Customer1 Subscriber4
Customer2 Subscriber5
Customer2 Subscriber6
Customer3 Subscriber7
Customer3 Subscriber8
I need to transform this table into the following format so there is only one record for each customer and the subscriber fields 1-x are going across the table.
CUSTID SUBIDCOL1 SUBIDCOL2 SUBIDCOL3 SUBIDCOL4
Customer1 Subscriber1 Subscriber2 Subscriber3 Subscriber4
Customer2 Subscriber5 Subscriber6
Customer3 Subscriber7 Subscriber8
My problem is that normally when doing this you can use the decode function using a standard categorical field like Department. but I need to go accross using SubscriptionID, My subscription ID's are unique. We have some code to create the output table with the appropriate amount of SUBIDCOLs but not sure how to manipulate the data.
This is telecoms data, so the subscriptions are phone mobile phone subscriptions and each person can have more than one subscription.
any suggetions
Thanks
Lee
CUSTID SUBID
Customer1 Subscriber1
Customer1 Subscriber2
Customer1 Subscriber3
Customer1 Subscriber4
Customer2 Subscriber5
Customer2 Subscriber6
Customer3 Subscriber7
Customer3 Subscriber8
I need to transform this table into the following format so there is only one record for each customer and the subscriber fields 1-x are going across the table.
CUSTID SUBIDCOL1 SUBIDCOL2 SUBIDCOL3 SUBIDCOL4
Customer1 Subscriber1 Subscriber2 Subscriber3 Subscriber4
Customer2 Subscriber5 Subscriber6
Customer3 Subscriber7 Subscriber8
My problem is that normally when doing this you can use the decode function using a standard categorical field like Department. but I need to go accross using SubscriptionID, My subscription ID's are unique. We have some code to create the output table with the appropriate amount of SUBIDCOLs but not sure how to manipulate the data.
This is telecoms data, so the subscriptions are phone mobile phone subscriptions and each person can have more than one subscription.
any suggetions
Thanks
Lee