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 2000 Forums
 SQL Server Development (2000)
 Selecting Multiple Rows for Same Values

Author  Topic 

CMangano
Starting Member

16 Posts

Posted - 2001-09-26 : 17:09:31
Assuming I have a table that looks like:

Part Spec Value
---- ---- -----
1 x y
2 x z
3 x y
1 a b
2 a d
3 a b

How do i write a query to return distinct parts that have spec x with a value of y, or spec a with a value of b? So, my result set would be:

Part
----
1
3

I am sure it is something easy and it is just not clicking for me. Thanks in advance.

   

- Advertisement -