Toad World® Forums

Executing a script that executes another (using @)


I am trying to run a script that executes a script inside it (using @) and I am getting errors when the first script tries to execute the second (p5.sql). When I run the script in regular TOAD I get no errors. Thanks for your help!

Script 1 inserts a record into table DPOINT and then executes script p5.sql

insert into dpoint values (‘Run Progs–P5’);



Script p5.sql inserts another record in DPOINT

insert into dpoint values (‘aaaaa’);


Opening a file and reading the contents using @sqlfile is a SQLPlus feature. The Toad Data Point editor does not support SQLPlus. We do have another utility that does. On the Editor menu there is an action called “Execute SQL Script in external APP”. If you select this it will send the contents of your editor into an app call “Script Runner” and this app will support SQL*Plus.

Thanks for the information… Now all I need to know is how to set up the parameters… Can you help me with that? Thanks

I believe everything should be set up. Just send the whole file to the external app. Give it a try.

Hi, I tried and it doesn’t work… All I want is the ability to execute the same scripts that I do in TOAD for Oracle in TDP using the TDP Automation feature, but it seems I will not be able to do that.

So...I have to disagree here. I have an Automation Script that was written honestly a while ago, but does contain SQLPlus. Now I will admit that the script doesn't read in any files using @, but it is for sure SQLPlus.

Are you able to run a very simple script such as the one below using automation?

Set define on

Define P_NAME = ‘BILL’

select ‘&&p_name._123’ from dual;

No, but this did work just fine…


P_NAME varchar2(4);





John Mc Graw
Data and Reporting Specialist

P 303-866-6974

1575 Sherman Street, Denver CO 80203 I

On Thu, Feb 15, 2018 at 8:35 AM, ALS82GT wrote:

RE: Executing a script that executes another (using @)

Reply by ALS82GT
Are you able to run a very simple script such as the one below using automation?

Set define on

Define P_NAME = ‘BILL’

select ‘&&p_name._123’ from dual;

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad Data Point Forum notifications altogether.

Toad Data Point - Discussion Forum

Flag this post as spam/abuse.

Thanks for trying John, but still not what I want…

Problem is, most of our scripts were written in “TOAD for Oracle” which allows things like DEFINE, SET, &&, etc. Now I am told we need to Automate these scripts using Data Point. These scripts (such as the simple examples I gave) DO run in TOAD for Oracle but DO NOT run in Data Point.