Posted by peppi911 on 04/27/06 12:14
Hi,
is it possible to create a cursor from a dynamic string?
Like:
DECLARE @cursor nvarchar(1000)
SET @cursor = N'SELECT product.product_id
FROM product WHERE fund_amt > 0'
DECLARE ic_uv_cursor CURSOR FOR @cursor
instead of using this
--SELECT product.product_id
--FROM product WHERE fund_amt > 0 -- AND mpc_product.status
= 'aktiv'
Havn't found anything in the net...
Thanks,
Peppi
Navigation:
[Reply to this message]
|