Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: Selecting s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 11024 of 11409
Post > Topic >>

Re: Selecting several types

by "Plamen Ratchev" <Plamen@[EMAIL PROTECTED] > May 7, 2008 at 10:17 AM

You can use DISTINCT:

SELECT DISTINCT I.item_id, I.item_name
FROM Items AS I
JOIN ItemTypes AS T
  ON I.item_id = T.item_id
WHERE T.item_type_id IN (100, 200);

HTH,

Plamen Ratchev
http://www.SQLStudio.com
 




 5 Posts in Topic:
Selecting several types
Danny <adler.danny@[EM  2008-05-07 06:00:30 
Re: Selecting several types
"Plamen Ratchev"  2008-05-07 10:17:20 
Re: Selecting several types
--CELKO-- <jcelko212@[  2008-05-07 13:05:28 
Re: Selecting several types
Ed Murphy <emurphy42@[  2008-05-07 20:32:57 
Re: Selecting several types
Erland Sommarskog <esq  2008-05-07 21:46:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 15:53:43 CDT 2008.