Table of Contents

TSQL - Iteration (Cursor, Fetch, Next)

Support

Select statements included within a function cannot return data to a client

Msg 444, Level 16, State 2, Procedure myProcedure, Line 44
Select statements included within a function cannot return data to a client.

Does all

<wrap>FETCH NEXT</note>

statements have an

<wrap>INTO</note>

in your table function ?

FETCH NEXT FROM myCursor;
FETCH NEXT FROM myCursor INTO @myVariable1, @myVariable2