Hi,
I have a requirement while loading the file.
The below file is semicolon delimiter & Double quote for character fields.
I/p:
1000;12-11-2000;"";"ASDDIK";"R"
1001;12-12-2001;"";""TOMI"" ";"R"
1002;01-01-1982;"";"";""
1003;12-12-2001;"";"AYEHHE;JDJUE";"";"R"
Actual O/P:
1000;12-11-2000;;ASDDIK;;R
1001;12-12-2001;;""TOMI"" ;R
1002;01-01-1982;;;
1003;12-12-2001;;AYEHHE;JDJUE;;R
Present O/P:
1000;12-11-2000;;ASDDIK;;R
1001;12-12-2001;;""TOMI"" ;R;""TOMI"" ;R
1002;01-01-1982;;;;;
1003;12-12-2001;;AYEHHE;JDJUE;;RAYEHHE;JDJUE;;R
job Design:
Sequential file-->Tranformer stage(3outputs for 4th,5th and 6th delimeters)--->funnel--->Oracle Connector
Description: In sequential file, i am reading file as single column because the data has more delimiters. In transformer stage i am using staging variables for free text field(4th field) and taking the string between the delimter but it is working only for 1st row not for all the rows.
Datatype is Varchar2
stg1: Index(DSlink1.001,';',3)+2
stg2: Index(DSlink1.001,';',4)-1
in derivation field: DSlink1.001[stg1,stg2]
From second record i am not able see the desired output.
Index functions are working fine.
Can you please let me know any suggestions for this issue.
Issue in capturing string by positions in transformer stage
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 55
- Joined: Tue Apr 24, 2007 1:26 am
So... which of these two is your "desired" output:
Actual O/P
Present O/P
Guessing the first (Actual) is what you desire and the second (Present) is what you are getting but would like to be sure before I lose too many brain-cells puzzling out more of this.
Actual O/P
Present O/P
Guessing the first (Actual) is what you desire and the second (Present) is what you are getting but would like to be sure before I lose too many brain-cells puzzling out more of this.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your logic is wrong, which is why things are repeating.
The simple solution would be to read each line as a single VarChar and to use a Convert() function to remove the double-quote characters.
The simple solution would be to read each line as a single VarChar and to use a Convert() function to remove the double-quote characters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.