tag:blogger.com,1999:blog-1010348719342749753.post6255787843146848932..comments2024-02-12T14:32:56.200+05:30Comments on Maulik Dhorajia: SQL Server : Using CTE(Common Table Expression) fetch a Tree ViewMaulik Dhorajiahttp://www.blogger.com/profile/12335234140583054583noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-1010348719342749753.post-26319506862366743352015-11-10T01:18:27.860+05:302015-11-10T01:18:27.860+05:30Glad it worked!Glad it worked!Maulik Dhorajiahttps://www.blogger.com/profile/12335234140583054583noreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-46159890864531235142015-11-05T04:28:59.769+05:302015-11-05T04:28:59.769+05:30This worked well for me. Now to convert result in...This worked well for me. Now to convert result into JSON nested objects...Jimhttps://www.blogger.com/profile/08545130942125467010noreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-79750023888528854022015-04-28T01:43:20.359+05:302015-04-28T01:43:20.359+05:30@Anonymous - I guess this query is not for searchi...@Anonymous - I guess this query is not for searching. You will have to modify it. The query is a solution to provide a tree view and not a search.<br /><br />Where clause will remove all the records which will not have "Amit Patel". So ultimately the tree will not form. If you are sure at what level you have to filter than its possible.<br /><br />In any case you will have to modify the query.Maulik Dhorajiahttps://www.blogger.com/profile/12335234140583054583noreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-86730347627498354192015-04-27T23:12:45.460+05:302015-04-27T23:12:45.460+05:30For example if I search for 'Amit Patel' ,...For example if I search for 'Amit Patel' , is it possible to display the tree view from root?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-76286779323824306932014-12-24T11:13:26.650+05:302014-12-24T11:13:26.650+05:30Not so easily. You will have to write a procedure ...Not so easily. You will have to write a procedure to create an xml. Better do it using C# or PHP. Can you put in more details? How you want the xml.<br /><br />Thanks,<br />Maulik DhorajiaMaulik Dhorajiahttps://www.blogger.com/profile/12335234140583054583noreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-20530970448783967852014-12-11T07:53:49.485+05:302014-12-11T07:53:49.485+05:30Good post... I have one requirement i.e., I want p...Good post... I have one requirement i.e., I want push the above table data in XML as tree structure using sql query... any solution?Anonymoushttps://www.blogger.com/profile/05162590109599970559noreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-44987592002421948702014-09-05T20:17:01.058+05:302014-09-05T20:17:01.058+05:30I was not able to see any issue. The tree was form...I was not able to see any issue. The tree was forming correctly. I don't see what the issue is? Please put in more details. I can fix it if there is any trouble. Also the example is just to create a tree view.Maulik Dhorajiahttps://www.blogger.com/profile/12335234140583054583noreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-61797385594539212292014-08-30T11:51:07.851+05:302014-08-30T11:51:07.851+05:30Nice try. still relies on order of data entry. a...Nice try. still relies on order of data entry. add (44 , 1 , 'XXitendra Makwana')Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-78914126198859814242014-07-14T20:04:01.917+05:302014-07-14T20:04:01.917+05:30This was not the cherry that pulled me out of a ve...This was not the cherry that pulled me out of a very frustrating day! Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-6605320874679000132013-12-11T18:19:05.250+05:302013-12-11T18:19:05.250+05:30Good Job, Thanks!!Good Job, Thanks!!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-11812243802324766102013-12-10T21:12:11.293+05:302013-12-10T21:12:11.293+05:30Thanks! DhorajiaThanks! DhorajiaAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-54788269372644813962013-11-02T01:38:55.547+05:302013-11-02T01:38:55.547+05:30This was the cherry that pulled me out of a very f...This was the cherry that pulled me out of a very frustrating day! Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-25246198683403427332013-03-20T19:30:59.511+05:302013-03-20T19:30:59.511+05:30thankyouthankyouAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-49943331368581457092012-09-06T17:22:48.810+05:302012-09-06T17:22:48.810+05:30Thank you for sharing. Very helpful!Thank you for sharing. Very helpful!Foodoogrhttps://www.blogger.com/profile/00167848720239138257noreply@blogger.comtag:blogger.com,1999:blog-1010348719342749753.post-17616118422896841322012-06-09T13:00:31.976+05:302012-06-09T13:00:31.976+05:30This saved my timeThis saved my timeAnonymoushttps://www.blogger.com/profile/08197644352538567322noreply@blogger.com