PMH4514
asked on
Declare cursor for --- the output of a stored procedure?
I have a stored procedure proc_users_select that returns a set of results.
I could do something like this:
DECLARE MY_CURSOR CURSOR FOR
SELECT * FROM USERS
however, my stored procedure isn't quite that simple, so what I'd rather do is:
DECLARE MY_CURSOR CURSOR FOR
proc_users_select
but I get an error message
Incorrect syntax near 'proc_users_select'.
Is this not allowed or is my syntax just wrong?
thanks
I could do something like this:
DECLARE MY_CURSOR CURSOR FOR
SELECT * FROM USERS
however, my stored procedure isn't quite that simple, so what I'd rather do is:
DECLARE MY_CURSOR CURSOR FOR
proc_users_select
but I get an error message
Incorrect syntax near 'proc_users_select'.
Is this not allowed or is my syntax just wrong?
thanks
Yeah.... you can't do that.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks Brandon!