I have data in .csv file, this is not fixed width file.
empno should get 1,
sal should get 1,00,000
and deptno should get 11.
how to read this in sequential file stage...
empno, sal, deptno
1,1,00,000,11
Any one Plz Help me....
Reading problem with Sequential file
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 166
- Joined: Wed Mar 16, 2005 6:52 am
- Location: Mumbai, India
Assumption Made:
exactly 3 fields in file. first field is empno, last field is deptno and everything else in the middle is the salary.
Possible Solution:
Read the entire row in as one column: Col1
In a transformer, map 3 columns
EMP<--Field(DSLink2.Col1,",",1,1)
Sal<--Field(DSLink2.Col1,",", 2,Dcount(DSLink2.Col1,",")-2)
Deptno,--- Field(DSLink2.Col1,",", Dcount(DSLink2.Col1,","),1)
Unable to test this though.. No PX available.
exactly 3 fields in file. first field is empno, last field is deptno and everything else in the middle is the salary.
Possible Solution:
Read the entire row in as one column: Col1
In a transformer, map 3 columns
EMP<--Field(DSLink2.Col1,",",1,1)
Sal<--Field(DSLink2.Col1,",", 2,Dcount(DSLink2.Col1,",")-2)
Deptno,--- Field(DSLink2.Col1,",", Dcount(DSLink2.Col1,","),1)
Unable to test this though.. No PX available.
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>