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
 General SQL Server Forums
 New to SQL Server Programming
 Need query 1

Author  Topic 

yaman
Posting Yak Master

213 Posts

Posted - 2009-09-18 : 13:59:38
Table consultant

Cont_id WS_id
1 2
2 2
1 3
2 3
3 3

Need that record whose cons_id have both WS_id 2,3

I want this result .
Cont_id Ws_id
1 2
2 2
1 3
2 3

Please help me out Sir .

Yaman

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-09-18 : 14:02:02
quote:
Need that record who have WS_id 2,3 both


What does this mean?

And in your example...even the last row has Ws_id 3..why is it not there in the output?
Go to Top of Page

yaman
Posting Yak Master

213 Posts

Posted - 2009-09-18 : 14:21:55
quote:
Originally posted by vijayisonly

quote:
Need that record who have WS_id 2,3 both


What does this mean?

And in your example...even the last row has Ws_id 3..why is it not there in the output?



sorry sir ,

I Need that record whose cons_id have both WS_id 2 & 3 .


Yaman
Go to Top of Page
   

- Advertisement -