Concatenate strings based on a dynamic table
Posted: Tue May 24, 2005 5:36 pm
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
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