Hi,
I have a very headache problem. I have a sequential file which contains more than 3 million records, every records has around 20 fields. The file contains product information about customers.
Here is the samples
Customer_ID, GAS, Eelectricty,Heating_Protection_Plan, Cooling_Protection_Plan, ....
1000,1, 0, 1, 0,....
The value 1 indicates customer has the product, 0 means not. The requrement is to genearte a producting_holding string (by concacatenating the product that customer owns), , but it is also required the sequence of each product within the string should be decided by a product table.
The sample of product is listed as below
Product sequence
Heating_Protection_Plan 1
Electricity 2
Cooling_Protection_Plan 3
GAS 4
......
For above example, the result would be 'Heating_Protection_Plan GAS", besides, the product table changes every months. I could not figure out any easy way to do in Datastage, any suggestions?
Thanks,
Carol
Concatenate strings based on a dynamic table
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 12
- Joined: Fri Apr 30, 2004 9:11 am
If you use your product sequence table in a multirow lookup, but don't specify a key, you should get all the rows from the table returned in the lookup in the order you want. Then you can string together the product name if there is a 1 on input. Then output that string when the customer id changes.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 64
- Joined: Fri Jul 16, 2004 7:53 am
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom