char to integer32
Moderators: chulett, rschirm, roy
char to integer32
Char to numeric conversion. Any suggestions?
Last edited by ds_is_fun on Sun Jul 24, 2005 9:46 pm, edited 2 times in total.
Umm... nothing. There's nothing wrong with what's happening. Any number of character zeroes sent to an integer field will become a numeric zero.
About the only way to 'avoid this transformation' would be to redefine your target field to be character as well.
About the only way to 'avoid this transformation' would be to redefine your target field to be character as well.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: char to integer32
int32_from_string in Modify stage. Just be very sure that every value can accurately be converted.ds_is_fun wrote:Char to numeric conversion. Any suggestions?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 9
- Joined: Tue Jul 26, 2005 11:12 pm
- Location: Bangalore
Re: char to integer32
char is left justified and int is right justified.ds_is_fun wrote:Char to numeric conversion. Any suggestions?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
So?
Trim trailing white space if that's necessary.
"12345" can be converted to an integer whether it's left- or right-justified.
Trim("12345 ") can also be happily converted to an integer.
Trim trailing white space if that's necessary.
"12345" can be converted to an integer whether it's left- or right-justified.
Trim("12345 ") can also be happily converted to an integer.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.