SqlDbx Forum

SqlDbx

You are not logged in.

#1 2011-07-26 08:45:28

pdrmgbtng
Member

How can I call a Procedure within a script in a SIMPLER way?

Currently if I want to execute a procedure from the script, I have to right-click the procedure  and click on 'Script EXECUTE' and SqlDbx will create the humongous script below:

VARIABLE _IN_FROM_DATE <IN_FROM_DATE,CHARACTER,> CHARACTER IN
VARIABLE _IN_TO_DATE <IN_GROUP,VARCHAR,> VARCHAR IN
VARIABLE OUT_SQLCODE INTEGER OUT
VARIABLE OUT_RETURNCODE INTEGER OUT
VARIABLE OUT_RETURNMESSAGE VARCHAR OUT
CALL MYPROCEDURE ('2011-01-01', '2011-01-31', ?OUT_SQLCODE, ?OUT_RETURNCODE, ?OUT_RETURNMESSAGE);

Is there a SIMPLER way to do this, like simply running 'CALL MYPROCEDURE('2011-01-01','2011-01-31',?,?,?)' , where the '?' are output variables?

I don't want to use the 'EXECUTE' option which opens up a window to enter my parameters, because I want to execute the procedure at least 10X with different parameters, and keep track/log of my runs.

Any help is very much appreciated.

Thank You,

Offline

#2 2011-07-26 10:22:37

sqldbxhelp
Administrator

Re: How can I call a Procedure within a script in a SIMPLER way?

The only required VARIABLE declarations are for OUT parameters, so it can be simplified.

VARIABLE OUT_SQLCODE INTEGER OUT
VARIABLE OUT_RETURNCODE INTEGER OUT
VARIABLE OUT_RETURNMESSAGE VARCHAR OUT
CALL MYPROCEDURE ('2011-01-01', '2011-01-31', ?OUT_SQLCODE, ?OUT_RETURNCODE, ?OUT_RETURNMESSAGE);

In the next release there will be easier way to specify out parameters inline.

Offline

#3 2023-04-14 03:01:14

valoni
Member

Re: How can I call a Procedure within a script in a SIMPLER way?

i have simple procedure

CALL MyProcedure()

code is as below
BEGIN

DECLARE C_READ CURSOR FOR
SELECT L . APPID , L . APPNAME , L . APPSURAME FROM  APPLICATIONS L ;

OPEN C_READ ;

END ;

but when i execute i don't shown any result on editor

if it called on MSSQL SERVER via Linked Server it return table

Offline

#4 2023-10-08 07:33:23

PiscesLady
Member

Re: How can I call a Procedure within a script in a SIMPLER way?

valoni wrote:

i have simple procedure

CALL MyProcedure()

code is as below
BEGIN

DECLARE C_READ CURSOR FOR
SELECT L . APPID , L . APPNAME , L . APPSURAME FROM  APPLICATIONS L ;

OPEN C_READ ;

END ;

but when i execute i don't shown any phenq where to buy result on editor

if it called on MSSQL SERVER via Linked Server it return table

This procedure sounds simple and easy too.

Last edited by PiscesLady (2023-10-10 06:56:51)

Offline

Board footer

Powered by FluxBB