Alphanumeric/Transformer

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
arnie_nits
Participant
Posts: 101
Joined: Mon Aug 13, 2007 2:32 am

Alphanumeric/Transformer

Post by arnie_nits »

Hi,

I have got some aplhanumeric values like 9125a, 9625aa. Now I need to convert the 'a's into 0. So, it should be like 91250, 962500. Plz give some hint how to do it in transformer.

Regards,
Arnie.
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Post by laknar »

Read the column as varchar then

Code: Select all

If IsNull(columnname) then @NULL Else If Num(columnname)=0 Then Convert('a','0',columnname) Else columnname
Post Reply