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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 join help

Author  Topic 

haroon2k9
Constraint Violating Yak Guru

328 Posts

Posted - 2010-11-04 : 07:31:37



hi,

tblbname :helpdeskdetails
sample date

hpid casename origin
66 issue1 66
83 issue2 83
87 issue3 83
95 issue4 83
96 issue5 96
97 issue6 96
98 issue7 96
104 issue8 96


output expected
if parameter passed is 83,childreq:87
if parameter passed 87,parent: 83,childreq:95
if parameter passed 95,origin: 83,parent: 87
if parameter passed 96,child: 97
if parameter passed 97,parent: 96,child :98
if parameter passed 98,origin :96,parent :97,child:104
if parameter passed 104,origin:96,parent:98

can you pl help me out

Sachin.Nand

2937 Posts

Posted - 2010-11-04 : 08:47:18
Can you please elaborate on the business rules that you apply to return the resultset?

PBUH

Go to Top of Page
   

- Advertisement -