cancel
Showing results for 
Search instead for 
Did you mean: 

Needs to continue execution after Execute statement

Former Member
2,368

Hello All, I am in trouble. Issue is after execute statement in procedure i want to do some more things in procedure. But the problem is after executing "Execute" statement, It is not executing other codes after that line.

Ex. CREATE PROCEDURE "DBA"."SP_Test11" (as_text VARCHAR(2000))

BEGIN

declare remote_id   varchar(128);
Execute (as_text);
SET remote_id = '10';
.
.
.

END;

I am passing as_text as "Select * from test"...

Thanks in advance...

Accepted Solutions (0)

Answers (1)

Answers (1)

johnsmirnios
Participant

If you execute a SELECT statement without an INTO in a procedure as you have done, it is a result set that is returned from the procedure. The caller of the procedure should fetch the rows and then execute a RESUME statement to allow execution to continue to the next result set, if there is one, or to the end of the procedure otherwise.

http://dcx.sybase.com/index.html#sa160/en/dbreference/resume-statement.html*d5e64379