Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To get the precision and scale

Status
Not open for further replies.

roche786

Programmer
Sep 5, 2002
24
US
Hi,

I declared a datatype of float , once i get the value in the variable , I have to extract the precision and scale from the float value. Kindly advise , I want to store the decimal value without the decimal point .


Thanks again!
 
Roche,

I'm not clear on your objective. Let me restate what I believe you want, then please correct any misconceptions:

You have an Oracle column which you defined as "float" for its data type. You have non-integer values which you have stored in the float column. You don't want to "waste" space by storing a decimal point. Is this correct?

If so, you have no worries. Oracle does not actually "store" a decimal point with any numeric column. The "decimal point" does not appea until you display a value since all numeric data in Oracle stores internally with a modified form of exponential notation and the decimal point is implied for each individual value.

Now, following my re-statement of your need and the above explanation, does this resolve your need...Or am I completely off base?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 20:58 (07Jan05) UTC (aka "GMT" and "Zulu"),
@ 13:58 (07Jan05) Mountain Time

Click here to Donate to Tsunami Relief. 100% of your contributions here go to the victims...0% to administration.
They were "The First-Responder" to the disaster, with relief deliveries arriving before Red Cross and U.S. aid.
 
Hi Mufasa,

You are off base, let me explain clearly what I need,


X FLOAT ;

x NOW HAS VALUE 90.99 .

I need 90 and 99 to be printed as 9099 instead of 90.99


Thanks for the help.
 
Roche,

So do you simply wish to get rid of the decimal point?:

Code:
select * from roche;

                 X
------------------
               123
            123.45
  12345678.1234567

select replace(x,'.') from roche;

REPLACE(X,'.')
---------------
123
12345
123456781234567

Sorry if I'm still off base...It's Friday and I'm ready for the weekend.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 21:49 (07Jan05) UTC (aka "GMT" and "Zulu"),
@ 14:49 (07Jan05) Mountain Time

Click here to Donate to Tsunami Relief. 100% of your contributions here go to the victims...0% to administration.
They were "The First-Responder" to the disaster, with relief deliveries arriving before Red Cross and U.S. aid.
 
This is exactly what I was looking for.


Thanks so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top