Page 1 of 1

how to extract numeric data?

Posted: Tue Nov 13, 2007 11:15 pm
by aaha_naga
Hi
In transformer i am having one input column as varchar. in that field i have to extract the numeric digits from the input data.please let me know if any functions available for that?

Re: how to extract numeric data?

Posted: Wed Nov 14, 2007 12:26 am
by kishore2456
What type of input is it exactly? It will be easier if you can post some sample data. Is it a mix of char & numerics?

Re: how to extract numeric data?

Posted: Wed Nov 14, 2007 12:40 am
by aaha_naga
kishore2456 wrote:What type of input is it exactly? It will be easier if you can post some sample data. Is it a mix of char & numerics?

Actually input field is varchar (10) and it contains julian date... now it have only numeric values.
ex: 35064,35884,1,

Posted: Wed Nov 14, 2007 12:56 am
by Maveric
If it is only "," then you can use the trim function. Not sure of the options but i think 'A' removes all occurences.

Trim(In.Col,',','A')

Posted: Wed Nov 14, 2007 1:25 am
by aaha_naga
[quote="Maveric"]If it is only "," then you can use the trim function. Not sure of the options but i think 'A' removes all occurences.

Trim(In.Col,',','A')[/quote

hi

In my sample data 35064,35884,1.. here 35064 is coming in a row and viz versa. i hope you meant all in a single row. it has not like that. i mentioned my ip column scale is 10 only. i hope trim and field functions are not correct options.

Posted: Wed Nov 14, 2007 2:17 am
by balajisr
Your requirement is not clear.

Give sample input data and sample output data.

You had mentioned
ex: 35064,35884,1,
Do you have three columns in your input?

Extracting Numeric data

Posted: Wed Nov 14, 2007 7:10 am
by mcs_murali83
Hai,

One of u r column contains the varchar as its datatype. But you want to extract the numeric values.

There is an option in transformer stage, goto functions----->
As integer(columnname)

Re: Extracting Numeric data

Posted: Wed Nov 14, 2007 10:14 am
by aaha_naga
mcs_murali83 wrote:Hai,

One of u r column contains the varchar as its datatype. But you want to extract the numeric values.

There is an option in transformer stage, goto functions----->
As integer(columnname)
murali
As integer is used to convert in to integer data type

Posted: Wed Nov 14, 2007 1:52 pm
by dsedi
As said,Requirement is not clear!
since you said you need to do something in transformer,Trim could be the best choice.check the guide it has lot of options.

Edi