Home » RDBMS Server » Server Utilities » SQLLDR Squence Number (SQLLOADER)
SQLLDR Squence Number [message #587199] Thu, 13 June 2013 03:34 Go to next message
Messages: 240
Registered: June 2006
Location: Chennai
Senior Member

I have a CSV file with 100 records and one of the column as FILE_ID.
I want to load one unique number for all 100 recs not for every records.

suppose my sequence returns 3 as nextval i want to load 3 for all 100 records

please help me to implement this in control file or sh file
I am using shell script to call sqlldr.

Re: SQLLDR Squence Number [message #587206 is a reply to message #587199] Thu, 13 June 2013 04:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68044
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can do it in many ways.
Here's one; as you are in shell you could call sqlplus to get the nextval and store in shell variable, then put this variable in the control file as a constant.

Re: SQLLDR Squence Number [message #587287 is a reply to message #587206] Thu, 13 June 2013 17:06 Go to previous message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
There are a couple of methods demonstrated in the following thread:

Previous Topic: SQL Loader issue
Next Topic: Import from 11g to 10g results in strange errors
Goto Forum:

Current Time: Fri Dec 03 05:54:58 CST 2021