Home » RDBMS Server » Server Utilities » SQL Loader and Selects
SQL Loader and Selects [message #74284] Wed, 27 October 2004 10:13 Go to next message
Joe
Messages: 138
Registered: November 1999
Senior Member
Is it possible to load a table using SQL Loader and imbedded SQL Select statements  to load data from a table in another instance?  I know I can do this in PL/SQL with an INSERT, however, due to the installation, I am limited to using SQLLOADER.  If possible can you provide an example?
Re: SQL Loader and Selects [message #74288 is a reply to message #74284] Thu, 28 October 2004 04:27 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
sql*loader cannot read from any oracle resource.
It can only write data into a table.
You may write a wrap-up script depending on the your OS.
AGAIN, sql statements and sqlldr are run in different sessions.
You cannot EMBED sql statements inside sqlldr.

something like
start the shell-wrap-script
 use sqlplus-connect-to-oracle
   run sql 1;
   spool the output to generate the textfile.
   run sql 2;
   EXIT;
 use sqlldr to load the texfile.
end of script.

data migration [message #74289 is a reply to message #74284] Thu, 28 October 2004 12:32 Go to previous message
azam
Messages: 5
Registered: August 2004
Junior Member
actually i need following script....
So, basically, the script will have to do the following:
1) Look in a particular directory that contains all of the .ncs files
2) Loop through files
a) Change filetype to .mdb
b) Connect to the file via ODBC and query the appropriate data
c) Connect to MNUSS(database) via ODBC
d) Query the MNUSS data to determine if the records already exist (decide if next query is an insert or an update)
e) Execute insert or update queries on relevant MNUSS tables
The script should create a log file of all actions so that they can be verified

please reply me soon

thanks
Previous Topic: SOL LOADER date problem
Next Topic: data migration
Goto Forum:
  


Current Time: Mon Jul 01 08:00:57 CDT 2024