Sandeep Kumar

Sandeep Kumar

  • 457
  • 4.3k
  • 612.5k

Getting error as exhausted before statement completion.

Jul 22 2016 4:14 AM
Hi all While I am executing below stored procedure I am getting error as&nbsp;<div id="pastingspan1">The maximum recursion 100 has been exhausted before statement completion.</div><div></div><div id="pastingspan1">ALTER procedure [dbo].[sp_AgentComsn] -- sp_AgentComsn 2</div><div id="pastingspan1">@Agent_Id int</div><div id="pastingspan1">as</div><div id="pastingspan1">begin</div><div id="pastingspan1">with tbparent as</div><div id="pastingspan1">(</div><div id="pastingspan1">select Agent_Id,Agent_ManagerId from Agent where Agent_Id=@Agent_Id</div><div id="pastingspan1">union all</div><div id="pastingspan1">select Agent.Agent_Id,Agent.Agent_ManagerId from Agent join tbparent on Agent.Agent_Id=tbparent.Agent_ManagerId</div><div id="pastingspan1">)</div><div id="pastingspan1">select Agent_Id from tbparent</div><div id="pastingspan1">end</div><br />Please Help me to resolve this one&nbsp;

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (1)