Home » RDBMS Server » Server Utilities » extract decimals through SQL*Loader
extract decimals through SQL*Loader [message #368022] Fri, 08 October 1999 16:40 Go to next message
sailaja
Messages: 11
Registered: October 1999
Junior Member
HI,
I am trying to convert a comma seperated flat file to Oracle table. The numeric data is defined as DECIMAL EXTERNAL, in the control file. In the table it is defined as NUMBER(8,2).
I want the numeric data to come in always as 2 digits after the decimal.
But its not always so e.g
470.00 comes as 470 into the table,whereas I want it as 470.00 in the table.
234.20 comes as 234.2 into the table, whereas I want it as 234.20 in the table.
Is there any way by which I can get the correct number of digits after the decimal.

Thanks in advance.
Sailaja
Re: extract decimals through SQL*Loader [message #368026 is a reply to message #368022] Mon, 11 October 1999 10:55 Go to previous message
Rajesh Matkar
Messages: 5
Registered: October 1999
Junior Member
Hi,
Oracle always store information like 470.00 comes as 470 into the table and 234.20 comes as 234.2 into the table. If you want output like 470.00 or 234.20, then u must be use TO_CHAR function in ur SELECT statment or u can define display format in ur frontend tool like 99999.99.
exp.
SELECT TO_CHAR(COL_NAME,'99999.99') FROM T_NAME;

Rajesh Matkar
Previous Topic: NT v's UNIX for NT
Next Topic: Sqlloader filtering data
Goto Forum:
  


Current Time: Sun Dec 22 22:43:24 CST 2024