regarding spliting the records
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 7
- Joined: Mon May 12, 2008 5:57 am
- Location: near BEML gate
regarding spliting the records
hi,
In my project there is one requirement that is
our souce is db2 table.For one column the data is comming like below
ws
ts/fe
rs
rs/js/lk/md
the requirement is i need to split the all the records which is having '/'.like below.
ws
ts
fe
rs
rs
js
lk
md
Can any one help on this.
Thanks
sujatha
In my project there is one requirement that is
our souce is db2 table.For one column the data is comming like below
ws
ts/fe
rs
rs/js/lk/md
the requirement is i need to split the all the records which is having '/'.like below.
ws
ts
fe
rs
rs
js
lk
md
Can any one help on this.
Thanks
sujatha
SUJA
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 7
- Joined: Mon May 12, 2008 5:57 am
- Location: near BEML gate
-
- Participant
- Posts: 7
- Joined: Mon May 12, 2008 5:57 am
- Location: near BEML gate
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Could you please tell us detail about your requirement? If you are selecting only one column from DB2 and try to get the result as you shown then CONVERT can do this. Use Convert function and write into another seqfile, and read the same file in the next job. But if you are selecting multiple column from your source along with the specified column and need the output as you mentioned along with other columns then CONVERT is not the right solution for that.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 7
- Joined: Mon May 12, 2008 5:57 am
- Location: near BEML gate
Thnks for ur response.
Convert is used to Replaces every instance of specified characters in a string with substitute characters.
but my requirement is i have to convert the data in to the records whereever '/' will come in incomming data.
Iam using only one column in db2.
Eg;
if the data contains like
we
ws/ms/ds
rs/fd/ff/ss/ll
re
i want the output like below
we
ws
ms
ds
rs
fd
ff
ss
ll
re
Convert is used to Replaces every instance of specified characters in a string with substitute characters.
but my requirement is i have to convert the data in to the records whereever '/' will come in incomming data.
Iam using only one column in db2.
Eg;
if the data contains like
we
ws/ms/ds
rs/fd/ff/ss/ll
re
i want the output like below
we
ws
ms
ds
rs
fd
ff
ss
ll
re
SUJA
-
- Participant
- Posts: 7
- Joined: Mon May 12, 2008 5:57 am
- Location: near BEML gate
Thnks for ur response.
Convert is used to Replaces every instance of specified characters in a string with substitute characters.
but my requirement is i have to convert the data in to the records whereever '/' will come in incomming data.
Iam using only one column in db2.
Eg;
if the data contains like
we
ws/ms/ds
rs/fd/ff/ss/ll
re
i want the output like below
we
ws
ms
ds
rs
fd
ff
ss
ll
re
Convert is used to Replaces every instance of specified characters in a string with substitute characters.
but my requirement is i have to convert the data in to the records whereever '/' will come in incomming data.
Iam using only one column in db2.
Eg;
if the data contains like
we
ws/ms/ds
rs/fd/ff/ss/ll
re
i want the output like below
we
ws
ms
ds
rs
fd
ff
ss
ll
re
SUJA
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom