datatype conversion

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
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

datatype conversion

Post by laxmi_etl »

Hi,

I have a field (A) coming in as varchar(22)
the data of that field is like this EMP.SALE..1978
the target table has this field as integer (10)
I need to strip off 'EMP.SALE' and convert the rest of the
number as integer.
I need to populate only 1978
What function works for this kind of conversion?

Thanks.
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Re: datatype conversion

Post by laxmi_etl »

laxmi_etl wrote:Hi,

I have a field (A) coming in as varchar(22)
the data of that field is like this EMP.SALE..1978
the target table has this field as integer (10)
I need to strip off 'EMP.SALE' and convert the rest of the
number as integer.
I need to populate only 1978
What function works for this kind of conversion?

Thanks.
I resolved it .
When I use the fallowing function it is working good.
Substrings(lnkdummy.A,11,22)
Post Reply