Posted by Jack Vamvas on 04/27/06 14:06
Not within the stored procedure, but I do know their are some undocumented
sps - such as "sp_cursoropen" and a few others with "sp_cursor*" which might
be abloe to do the job for you.
--
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
<peppi911@hotmail.com> wrote in message
news:1146129244.595060.254470@v46g2000cwv.googlegroups.com...
> 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]
|