Neglect the duplicate from the string

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Sgiri1
Participant
Posts: 43
Joined: Sat Nov 08, 2008 10:58 pm
Location: Tambaram

Neglect the duplicate from the string

Post by Sgiri1 »

hi

i get a field with values like

8803981188PCLAW018803981188PCLAW01
MMNQ1MMNQ1
TTHQ1VGTTHQ1VG

how do i neglect the second set of duplicate string from the above using transformer?my output should be somethng like

8803981188PCLAW01
MMNQ1
TTHQ1VG

Thanks
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Substring to half its length !!
Sgiri1
Participant
Posts: 43
Joined: Sat Nov 08, 2008 10:58 pm
Location: Tambaram

Post by Sgiri1 »

Sainath.Srinivasan wrote:Substring to half its length !!
can u exactly tell me how that could be done?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

What have you tried ?
Sgiri1
Participant
Posts: 43
Joined: Sat Nov 08, 2008 10:58 pm
Location: Tambaram

Post by Sgiri1 »

i have tried it through stage variables.
have taken the length of the string and divided it by two to get the original length and assigned the value to a stage variable. but i'm not sure in which function i shud use the stage variable to get the substring.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Substrings
Sgiri1
Participant
Posts: 43
Joined: Sat Nov 08, 2008 10:58 pm
Location: Tambaram

Post by Sgiri1 »

thnks it wrkd :D
Post Reply