?
Solved

SQL server 2008 Recursive error

Posted on 2014-10-29
1
Medium Priority
?
42 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 13

Accepted Solution

by:
Koen Van Wielink earned 2000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

743 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