Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> to_number from a varchar field.
Try :
select to_char(nvl(col1,'0')) from testtable;
If the column is NULL, NVL will be replaced by a character '0' which to_number will convert to zero.
Cheers,
Norman.
Tel: 0113 289 6265 Fax: 0113 289 3146 URL: http://www.Lynx-FS.comReceived on Mon Feb 10 2003 - 05:07:35 CST
-------------------------------------