You are here: Re: Declare dynamic Cursor from String « MsSQL Server « IT news, forums, messages
Re: Declare dynamic Cursor from String

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация