RE: converting a varchar value to decimal

RE: converting a varchar value to decimal

 

  

There may be an easier way, but here's what I came up with.

select to_number('14950', '99999.99')/100 as num from dual

result:

149.5

James Clark

-----Original Message-----
From: Rashied Mia
[mailto:oracledba-ezmlmshield-x5086606.[Email address protected]
Sent: Thursday, February 28, 2008 4:12 PM
To: LazyDBA Discussion
Subject: converting a varchar value to decimal

Hi

I need some help converting 14950 to 149.50. Whenever i try to cast it
gives me 14950.00.. Please assist. Thank you.

------------------------------------------------------------------------
--------
Please note: This e-mail and its contents are subject to a disclaimer
which can be viewed at http://www.woolworths.co.za/disclaimer. Should
you be unable to access the link please e-mail [Email address protected]

and a copy of the disclaimer will be e-mailed to you.


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



Oracle LazyDBA home page