Home » SQL & PL/SQL » SQL & PL/SQL » sql loader count in a variable
sql loader count in a variable [message #185665] Wed, 02 August 2006 23:55 Go to next message
ora_work
Messages: 4
Registered: July 2006
Junior Member
hello all, i am loading data from excel sheet into oracle table.
i want to get the number of rows fetched by the sql loader into a variable.
or even if that count (i.e. number of rows fetched) gets stored in one of the columns of the table, in which i am loading the data, will also do.
thnx in advance
Re: sql loader count in a variable [message #185677 is a reply to message #185665] Thu, 03 August 2006 01:21 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Create a NUMBER column and insert SQL*Loader's SEQUENCE value into it; its max value will be equal to the number of inserted records.

[EDIT]

Why did you start a new thread; what was wrong with this one?

[Updated on: Thu, 03 August 2006 01:23]

Report message to a moderator

Re: sql loader count in a variable [message #185680 is a reply to message #185665] Thu, 03 August 2006 01:29 Go to previous messageGo to next message
ora_work
Messages: 4
Registered: July 2006
Junior Member
thnx littlefoot
but can u give me small example of use of sequence in sql*loader!

and also, if it works it will give me the number of records that have beeen inserted in the table, but actually i want the number of records that were fetched by sql*loader.

then i will subtrast the records fetched by loader and records inserted in table, so it will give me the records rejected.

the next task is to somehow diaplay the rejected records
can u plz help me out from the above situation.?
waiting..........
Re: sql loader count in a variable [message #185687 is a reply to message #185680] Thu, 03 August 2006 02:15 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There are plenty examples in SQL*Loader documentation; do some research. Sequences are discussed here.

Information you'd like to gather can be found in the LOG file - everything is in there, along with the number of rejected and bad records. Use some text editor and view it.

If you want to have this information in SQL*Plus, don't use SQL*Loader but external tables (as suggested in another thread).
Previous Topic: how to travrse xml which come from webservice
Next Topic: null handling DBMS_XMLGEN
Goto Forum:
  


Current Time: Fri Dec 09 04:09:54 CST 2016

Total time taken to generate the page: 0.20232 seconds