varchar to number conversion

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
dr46014
Participant
Posts: 59
Joined: Fri Dec 08, 2006 11:09 am
Location: bhubaneswar

varchar to number conversion

Post by dr46014 »

hi all
i am reading a column in the flat file as string i.e varchar.while loading it into the oracle table the column defination in the table is number.so i am unable to load the column.i am using ODBC stage for this purpose.can anybody suggest me how can i convert varchar to number to load into table properly.is there any function for this purpose...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In a server job, simply pass it through a Transformer stage in which the input link carries the column as a VarChar and the output link carries the column as the appropriate numeric type.

Ideally, constrain the output link with a test that the value is actually numeric. The Num() function is ideal for this purpose.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dr46014
Participant
Posts: 59
Joined: Fri Dec 08, 2006 11:09 am
Location: bhubaneswar

Post by dr46014 »

got your point..
i made a mistake in my job..so error was coming..now it running fine..
thanks for your response
Post Reply