Re: Format of data types in Oracle

From: Keith Bremer <kbremer_at_uk.oracle.com>
Date: 1997/06/24
Message-ID: <33B01F82.CCCBB5C1_at_uk.oracle.com>#1/1


mserafino_at_ameritrade.com wrote:

> How can i select a double as an int in oracle?
> I am try to create an SQL statement that looks like:
>
> select x from table_y;
> For example: I get 5.53e5 when i want to see 55338.
>
> SQL Server has a convert function so I could say
> select convert(int,x) from table_y
>
> Also how would you get oracle to accept special characters (such as [
> ] #
> ) in a text field, is there an escape sequence to put in the string?
>
> thanks!
>
> -------------------==== Posted via Deja News
> ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet

 mserafino... (sorry, you didn't sign your post)

    I assume you are using SQL*Plus to execute your SQL? In that case all you need to do is type the command:
SET NUMFORMAT ""
and all should be well... (I suspect it has been set to 9.99EEE by your login.sql file).

    To get special formatting characters into the output, use the TO_CHAR function. For example, TO_CHAR(12345.678, '$999,990.99') gives $12,345.68. Refer to the SQL language ref guide for more details.

    Hope this helps...

        Keith Bremer (Oracle Education, Manchester, UK) Received on Tue Jun 24 1997 - 00:00:00 CEST

Original text of this message