-
Cursor with parameters
Hi everybody!
I need your help.
I want to do a store procedure with a cursor that looks like this
CREATE PROCEDURE dbo.stp_JubiiTopDubletter @pr varchar(255)
AS
DECLARE
cur_Dubletter
CURSOR FOR
SELECT * FROM discounts where id in (@pr)
OPEN cur_Dubletter
FETCH
cur_Dubletter
INTO
@pr
CLOSE cur_Dubletter
DEALLOCATE cur_Dubletter
for instance @pr='1,2,3'
Somebody know how make the cursor variable??
thank you for help
Regards
Zoraya
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|