Stop Script Execution Command in SQLTalk

forum.wishlist (1998-2005) & forum.gupta.wishlist (2005-2010)
Clifford W. Bass

Stop Script Execution Command in SQLTalk

Post by Clifford W. Bass » 28 Oct 2003, 18:09

 Posted by:  Clifford W. Bass 

Hello,

My wish for today is for a command that I can place within a SQLTalk
file that will tell it to stop executing the script part way through. There
is a pause command listed in the documentation which might suffice, if it
worked and if it allowed one to cancel the execution of the script. But I
have never known it it work in any of the Windows versions of SQLTalk, only
in the ancient DOS versions.

Clifford Bass

Aravind Ram

Stop Script Execution Command in SQLTalk

Post by Aravind Ram » 28 Oct 2003, 18:51

 Posted by:  Aravind Ram 

Not trying to be clever or anything, but this is what I do:

REMARK
\
Script begin
/
Valid SQL Commands...
...
...
...

REMARK
\
Got to stop here. Commit and execute a invalid command.
/
commit;

blah;

Valid SQL Commands...
...
...
...

Aravind

Mahesh Ramakrishnan

Stop Script Execution Command in SQLTalk

Post by Mahesh Ramakrishnan » 28 Oct 2003, 20:17

 Posted by:  Mahesh Ramakrishnan 

As far as I know, PAUSE never worked, whether SET PAUSE ON or OFF. Or I do
not know how to make it work.

If anyone knows what should I do to make PAUSE work, that would be
wonderful. It would be nice to get it working.

Thanks,

Mahesh Ramakrishnan
Visit www.aimsit.com

Clifford W. Bass

Stop Script Execution Command in SQLTalk

Post by Clifford W. Bass » 28 Oct 2003, 21:02

 Posted by:  Clifford W. Bass 

Hi Aravind,

Actually I had thought of that, and it is a good thought, but it has its
own drawbacks. At least for my purposes. For instance in order for that to
work, all the statements in the one section have to work and stop-on-error
has to be turned on. Unfortunately, there are times when I want to turn off
the stop-on-error feature. Instances like when I have been working on
adding, changing or deleting the various compiled commands in a test
database and am ready to make the changes in the production database:

erase a_existing_command;
store a_existing_command ...;

erase another_existing_command;
store another_existing_command ...;

erase an_retired_command;

store a_new_command ...;

If one or more of the "existing" commands do not actually exist for some
reason, then the erase command returns an error. But I do not care about
that error and just want to continue executing up to the specified spot in
the script.

Another option that I have used is the "exit" command. Unfortunately,
if the file is not in a modified/unsaved state, it exits you completely out
of SQLTalk. Really annoying when you do not want to do that. So it is not
the best option either.

Thanks,

Cliff

Return to “gupta.wishlist”

Who is online

Users browsing this forum: [Ccbot] and 0 guests