SQL Loader question - Using a sequence to populate column [message #19480] |
Thu, 21 March 2002 05:38 |
Mike Oakes
Messages: 25 Registered: December 2000
|
Junior Member |
|
|
Hello, I'm using sql loader to load data into the database from a flat file. I have 2 columns in the file and 2 in the database. The data looks like
"","test"
"","test1",
etc. The first column is always null. The database looks like
ID NUMBER
DESCRIPTION VARCHAR
I already have about 100 records loaded into the database. The ID uses a sequence to populate the column. Is there a simple way to populate the ID column from the sequence during a sql load. I have tried putting a sql statement in the ctl file.
"select ID.nextval from dual" but I receive an error. I thought about using a trigger or function but wondering if that is necessary.
Thanks for your help,
Mike O.
|
|
|
|
|