Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Execute SQL through Batch File, with Parameters

spalato76Oct 25 2012 — edited Oct 25 2012
Hi All,

I've executed SQL through Batch Files before but I'm a little stumped with executing the sql with parameters. So for instance I have a sql file called:
insert.sql

Insert into TableA
 select * from TableB
 where service_dt >= '&&x_start_dt' and service_dt <= '&&x_end_dt';
I can execute this without problems normally but including the substitution variables in the batch (.bat) file called Execute_insert.cmd is a bit troublesome...I've played around with it and can't get it to work.

Any help would be appreciated.

Thanks,
Ed
This post has been answered by John Spencer on Oct 25 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2012
Added on Oct 25 2012
2 comments
424 views