Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursor for a prepared SELECT

Status
Not open for further replies.

GuardianOfTheFlame

Programmer
Sep 4, 2007
31
IT
Hi all,
how can I create a cursor for a SELECT statement previously prepared?
I must do something like this:
DECLARE cur CURSOR
FOR SELECT * FROM <tab> WHERE Id=<id>;
<tab> and <id> are parameters passed to my stored procedure.
Can I prepare the SELECT statement and then assign it to the cursor AFTER the declaration?

Thanks,
Salo

---

The surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us - Calvin (and Hobbes) ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top