Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ravininave
Posting Yak Master
111 Posts |
Posted - 2010-02-25 : 08:06:22
|
| This is My QueryALTER PROCEDURE [dbo].[FindDownline] (@IBDNO_1 [numeric](9))As;with dataas(Select IBDNo,SP_IBDNo=IBDNo from IBDDets Where IBDNo=@IBDNo_1 union all Select s.IBDNo,d.SP_IBDNo FROM IBDDets s INNER JOIN data d ON s.SP_IBDNo=d.IBDNo)Select no_downline = count(*) from data where IBDNo<> SP_IBDNoOPTION (MAXRECURSION 365); It was running well till Yesterday. Now He is taking long process and even don't complete the query. I tried by changing MaxRecursion up 36000. What's another Solution. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-02-25 : 08:10:26
|
you might have a loop somewhere in the line that is causing it to goes into infinite loop KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-25 : 09:27:46
|
| can you check if you've any circular references in data?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
ravininave
Posting Yak Master
111 Posts |
Posted - 2010-02-25 : 11:45:47
|
| Yaa Sorry, there was problem with my data. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-25 : 11:50:18
|
| ok..i thought soanyways glad that you're sorted it out------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|