Monday, March 26, 2012

resetting @@FETCH_STATUS

Hi,
I'm using two cursors in the same proc.
Do I need to reset @.@.FETCH_STATUS before using it to check the status of the
second cursor? If so, how can this be done.
Many thanks for your answers in advance
Ant
You're using nested cursors? I am fairly confident you can avoid that...
help us help you by showing us your code and explaining why two cursors are
needed.
"Ant" <Ant@.discussions.microsoft.com> wrote in message
news:1B8B4F75-06D5-4DE6-A614-55AB5DA602AC@.microsoft.com...
> Hi,
> I'm using two cursors in the same proc.
> Do I need to reset @.@.FETCH_STATUS before using it to check the status of
> the
> second cursor? If so, how can this be done.
> Many thanks for your answers in advance
> Ant
|||You're on the right track. They weren't nested however, they were in line,
but...
Actually, I just readjusted the code so that I put everything in the first
cursor & now have no need for the second.
Sorry to waste your time but thanks very much for your answer none the less
Ant
"Aaron Bertrand [SQL Server MVP]" wrote:

> You're using nested cursors? I am fairly confident you can avoid that...
> help us help you by showing us your code and explaining why two cursors are
> needed.
>
>
> "Ant" <Ant@.discussions.microsoft.com> wrote in message
> news:1B8B4F75-06D5-4DE6-A614-55AB5DA602AC@.microsoft.com...
>
sql

No comments:

Post a Comment