Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datastage

Status
Not open for further replies.

PatelRam

Programmer
Aug 20, 2003
87
US
Hi,

I have a following sample source file. How do I extract data as target table as shown
format. I will appreciate if some one help me in this.


Source File:


Customer: 111
Product code Product Description Amount
A123 ABC 100.00
B123 XYZ 200.00
Customer: 112
Product code Product Description Amount
C123 PQR 100.00
C124 STU 200.00
C125 STU 200.00
Customer: 113
Product code Product Description Amount
D121 VWX 100.00
Customer: 114
Product code Product Description Amount
E121 SSS 100.00
E122 ZZZ 200.00
E162 ZXY 500.00
E989 ZsY 300.00


Target Table:
Customer Product_Code Product Desc Amount

111 A123 ABC 100.00
111 B123 XYZ 200.00
112 C123 PQR 100.00
112 C124 STU 200.00
112 C125 STU 200.00
113 D121 VWX 100.00
114 E121 SSS 100.00
114 E122 ZZZ 200.00
114 E162 ZXY 500.00
114 E989 ZsY 300.00


Thanks,


Ram
 
If you use DataStage TX, this is easy. It is designed to handle complex file types.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Yes, use the Complex Flat File (CFF) stage.

-------------------------
The trouble with doing something right the first time is that nobody appreciates how difficult it was - Steven Wright
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top