Msg 15871, '@@FETCH_STATUS' is not supported.

Lufuno Sape 0 Reputation points
2025-03-13T09:10:12.8566667+00:00

I am running a query and have @@Fetch_Status while loop, but the query stops at the while loop and gives the error:

Msg 15871, Level 16, State 6, Line 43

'@@FETCH_STATUS' is not supported.

Not sure what the problem could be. Please assist.

SQL Server Database Engine
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Olaf Helper 46,201 Reputation points
    2025-03-13T13:03:26.8333333+00:00

    That's really to less on informations to guess anything.

    Err msg 15871 don't comes from an on-premise SQL Server. Are you using any cloud solution?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.