Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: In stored proc, inner cursor needs variable from outer cursor

$
0
0

There is a subtle difference between ASE cursors declared inside a stored procedure ("server cursors") and cursors declared in ad-hoc SQL ("language cursors").

In ASE, you can declare as many cursors as you like inside a stored procedure. By definition, this is one batch since it all sits inside the CREATE PROCEDURE statement.

For a language cursor in ad-hoc SQL, you must indeed put the DECLARE...CURSOR statement in aseparate batch.


Viewing all articles
Browse latest Browse all 3587

Trending Articles