Home » SQL & PL/SQL » SQL & PL/SQL » clarification on sql loader
clarification on sql loader [message #29578] Thu, 11 March 2004 23:15 Go to next message
satish
Messages: 112
Registered: September 2000
Senior Member
hi,
i need a clarification on sql loader's features.
can the datafile which is feeded to the loader contain queries or sql functions in its records instead of data so that the loader executes the queries and replace them with data and later insert the records into the tables.
for example let the .dat file look like this

"sony",select entity from item where id==1
"ferrari", "car"

suppose that item is a two coloumn table(id, entity) in the database which is already filled.
can the loader execute the above query in the first record and replace it with data and then load it in to the database . plz help me. regards

satish
Re: clarification on sql loader [message #29583 is a reply to message #29578] Fri, 12 March 2004 04:00 Go to previous messageGo to next message
Frank Naude
Messages: 4580
Registered: April 1998
Senior Member
Hi,

No, SQL*Loader cannot execute queries embedded in the data. Nevertheless, you can specify functions in the loader control file.

Consider loading the data; then run a PL/SQL program to read the queries and update the column with its results.

Best regards.

Frank
Re: clarification on sql loader [message #29588 is a reply to message #29578] Fri, 12 March 2004 06:34 Go to previous message
Sud
Messages: 63
Registered: September 2002
Member
SQL*Loader provides such conditional checks on the data being loaded. It loads the data condiationally as per your critera, like, loading the data if it has so and so value at so and so column, but not checking the records which were already loaded. Check the SQL*Loader documentation for continueif, when, defaultif, etc control format options. These options allow to check and load the data conditionally.
Hope this helps.
Good luck :)
Previous Topic: Time deference calculation
Next Topic: Dups
Goto Forum:
  


Current Time: Mon Jul 01 09:35:43 CDT 2024