Solved

SQL server 2008 Recursive error

Posted on 2014-10-29
1
32 Views
Last Modified: 2015-09-08
Hi Experts,
While running the above query (original) he is getting following error(ROACH CODE ERROR)
(2.)
After modifying the query(modified query1) as follows
he is getting following error(ROACH ERROR log)
(3.)
And finall when we make following change(modified query2)
we do not get an error , but query ran for 12 hrs + without completion .
Could you pls provide solution.
Thanks in adavance.
modified-query1.txt
modified-query2.txt
original-query.txt
ROAC-Code-error.jpg
ROAC-Error-log.jpg
0
Comment
Question by:Sandeepiii
1 Comment
 
LVL 12

Accepted Solution

by:
Koen Van Wielink earned 500 total points
ID: 40412935
The error you're getting indicates there's something not right with your recursion, and it's stuck in an infinite loop. The second modification disables the maximum number of recursions SQL would normally allow, but since it's still an infinite query it keeps running until you termintate it manually.
It's hard to determine what is wrong with your query without sample data, table structures and an example of your expected output. Please post some sample data and a sample of your desired output.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now