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)
 Self join

Author  Topic 

haroon2k9
Constraint Violating Yak Guru

328 Posts

Posted - 2010-11-04 : 01:09:37
hi,

table name :tbldetails

helpdeskid casename originid
1 issue1 1

2 issue2 2

3 issue3 2

4 issue4 2

5 issue5 3
6 issue6 2


reslut set expected is:

if i pass the parameter as 2..

output:

helpdeskid casename originid

2 issue2 2

3 issue3 2

4 issue4 2

6 issue6 2

Sachin.Nand

2937 Posts

Posted - 2010-11-04 : 01:39:23
Is it this simple or am I missing something?



select * from tbldetails where originid=@parametervalue



PBUH

Go to Top of Page

haroon2k9
Constraint Violating Yak Guru

328 Posts

Posted - 2010-11-04 : 07:36:00
thnaks
Go to Top of Page
   

- Advertisement -