Page 1 of 1

Data separation

Posted: Fri Sep 10, 2010 1:32 pm
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?

Posted: Fri Sep 10, 2010 1:44 pm
by chulett
What's your business rule?

Posted: Fri Sep 10, 2010 1:49 pm
by agpt
I need only alphabetic data out.

Posted: Fri Sep 10, 2010 2:01 pm
by anbu

Code: Select all

Convert(Convert("ABC...Zabc..z","",Str),"",Str)

Posted: Fri Sep 10, 2010 2:12 pm
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).

Posted: Sat Sep 11, 2010 12:26 am
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?

Posted: Sat Sep 11, 2010 3:15 am
by ray.wurlod
Use a constraint something like Not(Num(Inlink.TheString))

Posted: Sat Sep 11, 2010 5:52 am
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?

Posted: Sat Sep 11, 2010 6:41 am
by chulett
Nope, it is testing the contents not the data type specifically. Give it a shot.