Data separation

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
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Data separation

Post by agpt »

Hi,
I have Numerical+Characters data in the source in the same column. Data type is varchar and it has values like 19, 'ABC'. How will I load only Character data to the target?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What's your business rule?
-craig

"You can never have too many knives" -- Logan Nine Fingers
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Post by agpt »

I need only alphabetic data out.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Code: Select all

Convert(Convert("ABC...Zabc..z","",Str),"",Str)
You are the creator of your destiny - Swami Vivekananda
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Your column has values like ABCD123FGVH. In that you want to load only ABCDFGVH. Is that you mean in your post.

If Yes, use Convert('0123456789','',String).
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Post by agpt »

no no
what i meant
suppose i have 5 records like
abc
123
efg
rst
345

Then in put put i need only 3 records from above which would be
abc
efg
rst

how can I implement that?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a constraint something like Not(Num(Inlink.TheString))
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Post by agpt »

ray.wurlod wrote:Use a constraint something like Not(Num(Inlink.TheString)) ...
Ray, but it's varchar column type so not(num()) is going to be true even for 123 value. right?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Nope, it is testing the contents not the data type specifically. Give it a shot.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply