Page 1 of 1

how to convert string to int in modifystage

Posted: Tue Jan 03, 2006 7:29 am
by arasan
required syntax to covert string to integer using modifystage

Function to convert String to Integer

Posted: Tue Jan 03, 2006 8:21 am
by Nageshsunkoji
Hi,

The function for converting int16 to string as follows :

NewColumn:int 16 = lookup_int16_from_string(Old Column:String)

In case of remaining Integer type the convesrion from string to integer would be default i.e. No function required to convert String to Integer.

Regards
Nagesh.

Posted: Tue Jan 03, 2006 3:46 pm
by ray.wurlod
I would have thought some of the simpler functions, such as int16_from_string or int32_from_string, or uint32_from_string, would have been more appropriate.

Posted: Tue Jan 03, 2006 4:28 pm
by vmcburney
Yep, the lookup functions translate a list of strings into a specified set of integer values, you are better off with Ray's list of conversion functions.

Posted: Fri Jul 07, 2006 6:16 am
by balajisr
ray.wurlod wrote:I would have thought some of the simpler functions, such as int16_from_string or int32_from_string, or uint32_from_string, would have been more appropriate. ...
Is int32_from_string and int16_from_string still available? I do not find it documented in version 7.5.1.

When i tried to use int32_from_string in the modify stage i get the following error:

Error in binding: Unknown conversion: int32_from_string