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

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: 58959
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.

Regards
Michel
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: 7975
Registered: November 2002
Location: California, USA
Senior Member
There are a couple of methods demonstrated in the following thread:

http://www.orafaq.com/forum/t/187236/43710/
Previous Topic: SQL Loader issue
Next Topic: Import from 11g to 10g results in strange errors
Goto Forum:
  


Current Time: Tue Sep 02 19:15:18 CDT 2014

Total time taken to generate the page: 0.22366 seconds