Dividing a field into two fields

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kennyapril
Participant
Posts: 248
Joined: Fri Jul 30, 2010 9:04 am

Dividing a field into two fields

Post by kennyapril »

The source is a file coming to the server which has a field Name-UserID
this field should be divided as two separate fields as Name and UserID

The input is one field

Tom-101
Joseph-102
John-103

the output has to be like two fields separately divided
Tom 101
Joseph 102
John 103

please suggest me the function to be used in transformer
Regards,
Kenny
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Field()
You are the creator of your destiny - Swami Vivekananda
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

To be more specific, "FIELD(In.Column,"-",1)" is the name, "FIELD(In.Column,"-",2) is the user-id.
kennyapril
Participant
Posts: 248
Joined: Fri Jul 30, 2010 9:04 am

Post by kennyapril »

That worked!!

Thank you
Regards,
Kenny
Post Reply