Page 1 of 1

DB2 string conversion

PostPosted: Thu Aug 12, 2010 10:29 am
by Anitha_S
which scalar function has to be used to convert 18 character string to numeric value?
Which scalar function has to be used to conver 24 character string to numeric value?

Re: DB2 string conversion

PostPosted: Thu Aug 12, 2010 8:05 pm
by GuyC
DB2 has about 150 scalar functions and for most of them it is clear what they do by name like abs() or substr().
I suggest you browse over them and see if anything fits, read the ones you don't understand.
Maybe something like DECIMAL() or CAST(xxxx as DECIMAL(24,0)) would do trick, What do you think?

Re: DB2 string conversion

PostPosted: Fri Aug 13, 2010 2:34 pm
by Anitha_S
bigint scalar function will work to conver string to numeric value.
I checked. Thanks a lot for ur reply.