Home » RDBMS Server » Server Utilities » SQL*Loader (Sequence problems and more)
SQL*Loader (Sequence problems and more) [message #178543] Wed, 21 June 2006 08:06 Go to next message
Diego_IT
Messages: 7
Registered: June 2006
Location: Italy
Junior Member
I’ve go 10 Excel files (12000 rows each) to import with SQL LOADER into ORACLE 9i tables.
In the file there's a full explain about.

Can anyone help me? What shoul I do???? HELP HELP !!!!

I hope i explained the problem properly. If you have any question, about the task, please let me know.
Thanks to anyone would help me
  • Attachment: trad.doc
    (Size: 35.50KB, Downloaded 1571 times)
Re: SQL*Loader (Sequence problems and more) [message #178550 is a reply to message #178543] Wed, 21 June 2006 08:38 Go to previous messageGo to next message
orausern
Messages: 826
Registered: December 2005
Senior Member
Regarding the first point, mentioned in your doc:
Quote:


In this case SQL LOADER works fine, but I have the "Prog" field empty and isn't a correct target, because I would like a sequential number
from 1 to 12000



I think it should be ok if that field is empty. After the import, you can update it with the sequence..like
update emp set empno=seq_name.nextval

and that will reset that field to sequence number.
Re: SQL*Loader (Sequence problems and more) [message #178577 is a reply to message #178550] Wed, 21 June 2006 10:14 Go to previous messageGo to next message
Diego_IT
Messages: 7
Registered: June 2006
Location: Italy
Junior Member
I've imported 1 file and it's Ok, but the "Prog" field is empty I don't understand what I have to do next, could you please explain the process again?
When do I have to do the update, do I have to do it fron S.O. or SQL PLUS?

SQL > UPDATE FIREWALL SET PROG=

Sorry..I dont' understand what you mean

Re: SQL*Loader (Sequence problems and more) [message #178579 is a reply to message #178577] Wed, 21 June 2006 10:41 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
NiravShah suggested to make use of a database sequence.
If all you need is an incrementing unique number, use rownum.
SQL> UPDATE FIREWALL SET PROG=rownum;
Re: SQL*Loader (Sequence problems and more) [message #178583 is a reply to message #178579] Wed, 21 June 2006 11:05 Go to previous messageGo to next message
Diego_IT
Messages: 7
Registered: June 2006
Location: Italy
Junior Member
NO..I need to number the rows from 1 to the end (12000 and after).


Tx for any idea and help.
Re: SQL*Loader (Sequence problems and more) [message #178590 is a reply to message #178583] Wed, 21 June 2006 12:09 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
That is what it does.

scott@9i > select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
           ACCOUNTING     NEW YORK
           RESEARCH       DALLAS
           SALES          CHICAGO
           OPERATIONS     BOSTON


scott@9i > update dept set deptno=rownum;

4 rows updated.

scott@9i > select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
         1 ACCOUNTING     NEW YORK
         2 RESEARCH       DALLAS
         3 SALES          CHICAGO
         4 OPERATIONS     BOSTON

Re: SQL*Loader (Sequence problems and more) [message #178650 is a reply to message #178590] Thu, 22 June 2006 02:07 Go to previous message
Diego_IT
Messages: 7
Registered: June 2006
Location: Italy
Junior Member
YES !!!

Tx to ALL.
Previous Topic: SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
Next Topic: imp/exp only procedures/packages only..
Goto Forum:
  


Current Time: Thu Jul 04 19:35:22 CDT 2024