Conversion String to Number

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
svishaal
Participant
Posts: 3
Joined: Tue Jul 12, 2005 3:06 am

Conversion String to Number

Post by svishaal »

Hi

I have some set of records, one of the columns of that recordset having expressions in it that is a varchar columns, Now I want to have result of those expressions e.q.

Say.. particular columns having 10/2 values in it... now I want the end result of this expression i.e. 5

This columns can have multiple expression also like 10/2 + 20 now the end result would be 25.

Can anybody tell me how can i do this, how can i convert this string into proper number format in datastage... I can not use Oracle PL Sql ... I just have to use DataStage only...

waiting for reply

Thanks in advance...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Take a look at this thread for dynamic evaluation using EVAL in Basic. It is rather roundabout and inefficient but will work.
Post Reply