CTE - Recursive SQL
Thank you all! Indeed there are some issues with cycles in the data. It was a combination of Ramireddy's response and Erland that helped me solve this.-->Example CategoryId | ParentCategoryId10...
View ArticleCTE - Recursive SQL
If u dont want levels, I think u no need of any query.. what ever u want its already in table.Anyway, coming to changes part, Not only I added levels, I made 3 more changes. In CTE, in recursive part i...
View ArticleCTE - Recursive SQL
> Thank you both for pointing me in the right direction. I've updated my question a little bit. Now i understand how to write the CTE query, but i'm running into issues with maxrecursion of 32767....
View ArticleCTE - Recursive SQL
HierarchyId? Here is the output of the query you gave me:My actual categorystructure has got that many levels. Do i need to use a cursor then? How do i set that up?cheers,John
View ArticleCTE - Recursive SQL
I'm using SQL server 2008. I've already used the maxrecursion option and set it to the maximum value.
View ArticleCTE - Recursive SQL
BUt do u have 32,767 levels?? If that is the case, u cannot use recursive CTE. u need to go for a cursor... or If u can change your design, HeirarchyId in sql2008 might be useful.But before that first...
View ArticleCTE - Recursive SQL
What is @@version?See if MAXRECURSION works for you.Recursive CTE MAXRECURSION usage example: http://www.sqlusa.com/bestpractices2005/sequence/Kalman Toth, SQL Server & Business Intelligence...
View ArticleCTE - Recursive SQL
Thank you both for pointing me in the right direction. I've updated my question a little bit. Now i understand how to write the CTE query, but i'm running into issues with maxrecursion of 32767. Does...
View ArticleCTE - Recursive SQL
You can use recursive CTE for this.. Please have a look at this and let us know if u face any...
View ArticleCTE - Recursive SQL
John,The following page demonstrates how to architect recursive CTE (tree) processing to create the organizational chart of AdventureWorks Cycles, a fictional company invented by Microsoft staff for...
View ArticleCTE - Recursive SQL
Hey Guys,Hope you can help me out over here. We are building a datamart for a large group of users. They will use BOE webi's to generate reports with. One of the tables is a category structure (see...
View Article