Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old June 7th, 2004, 03:07 PM
bzborow1 bzborow1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Canada
Posts: 84 bzborow1 User rank is Corporal (100 - 500 Reputation Level)bzborow1 User rank is Corporal (100 - 500 Reputation Level)bzborow1 User rank is Corporal (100 - 500 Reputation Level)bzborow1 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 17 h 51 m 9 sec
Reputation Power: 7
Oracle decimals...

Hi everyone,

I've got an Oracle DB that I need to output data in a decimal format. Sample data such as 40.00 gets written into Oracle as 40. I've got a precision = 6 and a scale = 2. Any thoughts on how to get that 40 to display in my query as 40.00?? I'm sure there's an easy way, i just can't find it anywhere.

Reply With Quote
  #2  
Old June 7th, 2004, 04:40 PM
Kraeg Kraeg is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Schaumburg, IL
Posts: 20 Kraeg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
select to_char(my_field,'9999.90')
from my_table

Reply With Quote
  #3  
Old June 16th, 2004, 12:01 PM
astrocanis astrocanis is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 14 astrocanis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to astrocanis
storage and display are completely separate. you must either format the query as shown in prior post or set a format mask in your form.

Reply With Quote
  #4  
Old June 25th, 2004, 06:59 AM
RJR RJR is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 4 RJR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hello,

if you want leading 0 you ending 0 you can use:

select to_char(my_field,'0999.90')
from my_table

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Oracle decimals...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway