change datatype

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
rmeenakumari822
Participant
Posts: 30
Joined: Sat Oct 25, 2008 9:09 pm
Location: chennai

change datatype

Post by rmeenakumari822 »

Hi,

I need to change the datatype.....
like varchar to integer

I can use modify stage to solve it
can any one say me the syntax to change datatype

Specification=??????????????

Thanks
priya
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

All the functions should be in the Parallel Job Developers Guide chapter concerning the Modify stage. There are some errors in this chapter but none, as far as I am aware, relating to the type conversion functions. A more accurate document is the Orchestrate Operators guide, which can be had for the asking (ask for "OEM manuals") from your support provider.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

new column name = old column name

should work.
Kandy
_________________
Try and Try again…You will succeed atlast!!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not necessarily. Implicit conversions work only when there can be no ambiguity. For example there is no ambiguity in integer to string, because every integer can be represented as a string. The reverse is not true, however, because not every string can be represented as an integer. Therefore an explicit conversion function - in this case probably decimal_from_string(InputField) - will be required to convert from a string to an integer. You then rely on the implicit conversion from decimal to integer, and perhaps add a NOWARN specification to suppress the alert message that it generates.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply