The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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...

asked 15 Mar '13, 16:41

Aanal%20Patel's gravatar image

Aanal Patel
16124
accept rate: 0%

edited 15 Mar '13, 17:01

Mark%20Culp's gravatar image

Mark Culp
22.3k9129262


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

permanent link

answered 15 Mar '13, 16:46

John%20Smirnios's gravatar image

John Smirnios
8.7k377106
accept rate: 40%

edited 15 Mar '13, 16:47

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×10
×5
×1

question asked: 15 Mar '13, 16:41

question was seen: 621 times

last updated: 15 Mar '13, 17:01