Page 1 of 1

change datatype

Posted: Fri Dec 05, 2008 7:46 am
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

Posted: Fri Dec 05, 2008 2:52 pm
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.

Posted: Fri Dec 05, 2008 3:12 pm
by kandyshandy
new column name = old column name

should work.

Posted: Fri Dec 05, 2008 3:24 pm
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.