T-SQL Stored Procedure for Looping a hierarchy with recursion

前端 未结 1 1639
天命终不由人
天命终不由人 2021-01-26 16:09

i have a specific Question.

My Stored Procedure don\'t work correctly.. I will show you the Procedure, the database and the parameter:

ALTER PROCEDURE [d         


        
1条回答
  •  盖世英雄少女心
    2021-01-26 16:56

    The fetch statement in the while block may be the cause. Currently it reads:

    FETCH NEXT FROM ServiceProviderChildren_Cursor INTO @childSPPId;
    

    try replacing it with:

    FETCH NEXT FROM ServiceProviderChildren_Cursor INTO @childSPPId, @isDeleted;
    

    0 讨论(0)
提交回复
热议问题