Sunday, March 25, 2012

Cursor for dynamic sql

is it possible to declare cursor for dynamic sql ?
thanksCould you show give us some more detail on what is it that you are trying to
do?
I tend to avoid cursors and dynamic SQL where possible, but you are asking
for a combination of both :-)
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"prefect" <uykusuz@.uykusuz.com> wrote in message
news:%237MeBX52FHA.3588@.TK2MSFTNGP15.phx.gbl...
is it possible to declare cursor for dynamic sql ?
thanks|||Refer to this.
http://www.sommarskog.se/dynamic_sql.html#cursor
But remember, you are digging your own grave.
--
Regards
R.D
--Knowledge gets doubled when shared
"prefect" wrote:

> is it possible to declare cursor for dynamic sql ?
> thanks
>
>|||he he :) , i was expecting that kind of response.
i am producing loginnames from name + surname according to some logic.
when a loginname repeats , i have to change the logic for each repeating
loginname therefore i have to use cursor inside a cursor but only once and
bla bla......anyway i solved my problem, thanks for your interest...
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:%23lkb7o52FHA.3880@.TK2MSFTNGP12.phx.gbl...
> Could you show give us some more detail on what is it that you are trying
> to
> do?
> I tend to avoid cursors and dynamic SQL where possible, but you are asking
> for a combination of both :-)
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "prefect" <uykusuz@.uykusuz.com> wrote in message
> news:%237MeBX52FHA.3588@.TK2MSFTNGP15.phx.gbl...
> is it possible to declare cursor for dynamic sql ?
> thanks
>
>

No comments:

Post a Comment