June 17, 2011 at 12:12 am
dear sir/madum
i am attaching one document which cannot be solved by me from 8 days onwards.
this querry is used to devlop tree in a front end.
kindly solve it and forward me .
June 17, 2011 at 12:37 am
I can't open your attachment.
Can you tell your prob
Muthukkumaran Kaliyamoorthy
https://www.sqlserverblogforum.com/
June 17, 2011 at 12:49 am
Table1 Bmmic_project_treeviw
IDPARENTIDTITLE
10 BMM
21 BAR MILL
32 FURNANCE
42 INTERSTAND
52 FINISHING STAND
62 COOLINGBED
73 REFRACTORY
83 CIVILWORK
93 STRUCTURES
103 PIPING
1110 VALVES
1210 GAS PIPES
139 STEEL STRUCTURES
149 RCC STRUCTURES
Table2: Bmmic_projcet_elemnt
IDTITLEBUDGET
1BMM6000
2BAR MILL100
3FURNANCE100
4INTERSTAND20
5FINISHING STAND10
6COOLINGBED20
7REFRACTORY5
8CIVILWORK10
9STRUCTURES10
10PIPING2
11VALVES2
12GAS PIPES10
13STEEL STRUCTURES10
14RCC STRUCTURES10
as mentioned above two tables are there in that the relation is developed based on id's between two tables.
if i am selecting id 2 its end nodes FURNANCE , INTERSTAND , FINISHING STAND COOLINGBED has to display
if there is no child means only parent has to be display.
so that we have to display parent nodes and its child nodes. base on this table we can built a tree in front end.
kindly solve it and send me as early as possible.
June 17, 2011 at 1:17 am
Please post table definitions, sample data and desired output. Read this to see the best way to post this to get quick responses.
http://www.sqlservercentral.com/articles/Best+Practices/61537/
nsaireddymca (6/17/2011)
kindly solve it and send me as early as possible.
We're all volunteers here, all posting in our spare time. If you want something done immediately, hire someone.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 17, 2011 at 1:18 am
Hi..
Firstly... it would be great if you can give the DDL scripts for the tables along with relations/indices etc. and the scripts to insert the sample data. This would help us to help you...
from my understanding of the question this looks like it can be solved using CTE... try looking at this site... this could help...
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply