Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Storing of number datatype in table

Re: Storing of number datatype in table

From: Arup Nanda <arupnanda_at_hotmail.com>
Date: Sat, 23 Nov 2002 12:48:37 -0800
Message-ID: <F001.0050A214.20021123124837@fatcity.com>


There is a file called glogin.sql under $ORACLE_HOME/sqlplus/admin where you can place the line set numwidth 13, or whatever else. This file is read by every session when they connect through sql*plus in that machine. Caution : sessions sonncting through sqlplus only on that machine read this, not from other cleint machines.

HTH Arup Nanda
www.proligence.com

>From: Stephane Faroult <sfaroult_at_oriole.com>
>Reply-To: ORACLE-L_at_fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Subject: Re: Storing of number datatype in table
>Date: Fri, 22 Nov 2002 23:43:43 -0800
>MIME-Version: 1.0
>Received: from newsfeed.cts.com ([209.68.248.164]) by
>mc8-f7.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sat, 23 Nov
>2002 00:43:04 -0800
>Received: from fatcity.UUCP (uucp_at_localhost)by newsfeed.cts.com
>(8.9.3/8.9.3) with UUCP id AAA54290;Sat, 23 Nov 2002 00:39:57 -0800 (PST)
>Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 00509FD7;
>Fri, 22 Nov 2002 23:43:43 -0800
>Message-ID: <F001.00509FD7.20021122234343_at_fatcity.com>
>X-Comment: Oracle RDBMS Community Forum
>X-Sender: Stephane Faroult <sfaroult_at_oriole.com>
>Sender: root_at_fatcity.com
>Errors-To: ML-ERRORS_at_fatcity.com
>Organization: Fat City Network Services, San Diego, California
>X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
>Precedence: bulk
>Return-Path: root_at_fatcity.cts.com
>X-OriginalArrivalTime: 23 Nov 2002 08:43:04.0341 (UTC)
>FILETIME=[56956450:01C292CC]
>
>Sathyanaryanan_K/VGIL_at_vguard.satyam.net.in wrote:
> >
> > Thank u list for ur imm resp. It was the prob with numwidth.
> > Now I have set the num width to 25 and s working fine.
> > But whenever i stat the sql the default is set to 9. how do i change the
> > def numwidth??
> > Regards,
> >
> > Sathyanarayanan
> >
> > |--------+----------------------->
> > | | "Arup Nanda" |
> > | | <arupnanda_at_ho|
> > | | tmail.com> |
> > | | |
> > | | 22/11/2002 |
> > | | 19:38 |
> > | | Please |
> > | | respond to |
> > | | ORACLE-L |
> > | | |
> > |--------+----------------------->
> > >------------------------------------------------------|
> > | |
> > | To: Multiple recipients of list ORACLE-L |
> > | <ORACLE-L_at_fatcity.com> |
> > | cc: (bcc: Sathyanaryanan K/VGIL) |
> > | Subject: Re: Storing of number datatype in |
> > | table |
> > >------------------------------------------------------|
> >
> > The number is more than the numwidth specified. Try this
> >
> > SQL> set numwidth 13
> > SQL> select trn_id from trnid;
> >
> > Your numwidth is perhpas defined as 9; so anything of more precision is
> > displayed as exponetial notation; internally all numbers are stored the
> > same.
> >
> > HTH
> >
> > Arup Nanda
> > www.proligence.com
> >
> > ----- Original Message -----
> > To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com>
> > Sent: Friday, November 22, 2002 6:23 AM
> >
> > > Dear List
> > >
> > > Have a look at the sql !!!
> > >
> > > SQL> create table trnid
> > > 2 ( trn_id number(10));
> > > Table created.
> > >
> > > SQL> insert into trnid(trn_id) values('1111111111');/* 10 1's
>inserted*/
> > > 1 row created.
> > >
> > > SQL> insert into trnid(trn_id) values('111111111');/* 9 1's inserted*/
> > > 1 row created.
> > >
> > > SQL> commit;
> > > Commit complete.
> > >
> > > SQL> select trn_id from trnid;
> > >
> > > TRN_ID
> > > ---------
> > > 1.111E+09
> > > 111111111
> > >
> > > can anyone tell why the number(10) is stored in exp format
> > >
> > > Regards,
> > >
> > > Sathyanarayanan
> > >
> > >
>
>Set the value you want in $ORACLE_HOME/sqlplus/admin/glogin.sql or its
>Windows equivalent.
>--
>Regards,
>
>Stephane Faroult
>Oriole Software
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Stephane Faroult
> INET: sfaroult_at_oriole.com
>
>Fat City Network Services -- 858-538-5051 http://www.fatcity.com
>San Diego, California -- Mailing list and web hosting services
>---------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).



MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Arup Nanda
  INET: arupnanda_at_hotmail.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Sat Nov 23 2002 - 14:48:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US