dbTalk Databases Forums  

How to convert the CHAR type to NUM in the select?

comp.databases.informix comp.databases.informix


Discuss How to convert the CHAR type to NUM in the select? in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Killwind
 
Posts: n/a

Default How to convert the CHAR type to NUM in the select? - 09-12-2003 , 09:58 PM






Hi :
I want to convert a char column to a num type;
I don't known which internal function can be used!
Sample :
select to_num( char_column_name ) from my_table;

Thanks!






Reply With Quote
  #2  
Old   
Paul Watson
 
Posts: n/a

Default Re: How to convert the CHAR type to NUM in the select? - 09-13-2003 , 04:14 AM






select char_col::INT
from eric

will work in the 9 engines

or

select char_col + 0
from eric

in the earlier engines

Killwind wrote:
Quote:
Hi :
I want to convert a char column to a num type;
I don't known which internal function can be used!
Sample :
select to_num( char_column_name ) from my_table;

Thanks!
--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.