DB2 string conversion



IBM's flagship relational database management system

DB2 string conversion

Postby Anitha_S » Thu Aug 12, 2010 10:29 am

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?
Anitha_S
 
Posts: 5
Joined: Thu Aug 12, 2010 10:26 am
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 string conversion

Postby GuyC » Thu Aug 12, 2010 8:05 pm

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?
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times

Re: DB2 string conversion

Postby Anitha_S » Fri Aug 13, 2010 2:34 pm

bigint scalar function will work to conver string to numeric value.
I checked. Thanks a lot for ur reply.
Anitha_S
 
Posts: 5
Joined: Thu Aug 12, 2010 10:26 am
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post