SQL Load from within another script

jpm3121
jpm3121 used Ask the Experts™
on
Does anybody know how to execute sqlldr from within a sql shell script?  Something like:

select sysdate from dual;

@ /sqlldr apps/apps@db data.ctl;

select sysdate from dual;
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
instead of @ use the HOST command!



select sysdate from dual;

HOST /sqlldr apps/apps@db data.ctl;

select sysdate from dual;



Cheers, Stefan

Commented:
I have a form with the WHEN-BUTTON-PRESSED trigger that executes the following code which launches the SQl loader.

this is an example of the code.

host ('sqlldr.exe vail_wt/superman@enterprise control=V:\VAILTECH\WATER\modecode\DMODE.CTL');

hope this helps :)
From the SQL file you may write -

HOST sqlldr <username>/<password>@<hostname> <your control file>

Does it help??

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial