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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Number (7.2) or Integer

Status
Not open for further replies.

CatPlus

Technical User
Jan 30, 2003
236
I copy a table from one schema to another using directions at
However, the fields in originating table is Number (7,2) whereas the destination table brings the field as integar value which rounds off numbers, for example, 9.2 is brought over as 9 and 9.51 brings over 10

What parameter should I use to specify field/column properties? I am using Oracle version 9

Please help
 
Cat,

I just tried to simulate your situation:
Code:
SQL> desc s_emp
 Name                    Null?    Type
 ----------------------- -------- -------------
 ID                      NOT NULL NUMBER(7)
 LAST_NAME               NOT NULL VARCHAR2(25)
 FIRST_NAME                       VARCHAR2(25)
 USERID                           VARCHAR2(8)
 START_DATE                       DATE
 COMMENTS                         VARCHAR2(255)
 MANAGER_ID                       NUMBER(7)
 TITLE                            VARCHAR2(25)
 DEPT_ID                          NUMBER(7)
 SALARY                           NUMBER(11,2)
 COMMISSION_PCT                   NUMBER(4,2)

copy from test/<pw>@dhunt to test/<pw>@dhunt create s_emp2 using select * from s_emp;

   25 rows selected from test@dhunt.
   25 rows inserted into S_EMP2.
   25 rows committed into S_EMP2 at test@dhunt.

SQL> desc s_emp2
 Name                    Null?    Type
 ----------------------- -------- -------------
 ID                      NOT NULL NUMBER(7)
 LAST_NAME               NOT NULL VARCHAR2(25)
 FIRST_NAME                       VARCHAR2(25)
 USERID                           VARCHAR2(8)
 START_DATE                       DATE
 COMMENTS                         VARCHAR2(255)
 MANAGER_ID                       NUMBER(7)
 TITLE                            VARCHAR2(25)
 DEPT_ID                          NUMBER(7)
 SALARY                           NUMBER(11,2)
 COMMISSION_PCT                   NUMBER(4,2)
Notice that the column definition for "SALARY" was (11,2) in the original table and is the same in the resulting table.

To help isolate your problem, can you please post the COPY code that you used?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Thanks Mufasa!

DESC revealed the column was INTEGER. Changed it to NUMBER and it works!

Appreciate your help

Happy Thanksgiving
Mickey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top