Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Convert Retrieved Char Data to Numeric

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ballalsachin

New User


Joined: 22 Sep 2005
Posts: 15
Location: USA

PostPosted: Thu Jan 22, 2009 6:11 pm    Post subject: Convert Retrieved Char Data to Numeric
Reply with quote

Hi,

Is there a way to convert Char Data to Integer data type in SQL ?
Can I use any intrinsic function available ?

Thanks
Sachin Ballal
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Thu Jan 22, 2009 6:17 pm    Post subject:
Reply with quote

Yes. You can. Check out the "IBM Manuals" link at the top of this page. SQL Reference guide has all the details you want.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Fri Jan 23, 2009 4:24 pm    Post subject:
Reply with quote

Sachin,

You can use this query to convert CHAR to INT
Code:
SELECT INTEGER(COL1) FROM SENTEST WHERE COL2='13';   


Sushanth Bobby
Back to top
View user's profile Send private message
ballalsachin

New User


Joined: 22 Sep 2005
Posts: 15
Location: USA

PostPosted: Wed Jan 28, 2009 10:34 am    Post subject: Reply to: Convert Retrieved Char Data to Numeric
Reply with quote

Thanks Guys!!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us