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 > Selecting sever...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 11024 of 11262
Post > Topic >>

Selecting several types

by Danny <adler.danny@[EMAIL PROTECTED] > May 7, 2008 at 06:00 AM

Hi all,

So I have these tables of items and item-types, and the items can be
of several types:

Items:
ID ; Name
1 ; Item1
2 ; Item2

ItemType:
ID ; Type
100 ; Type1
200 ; Type2
300 ; Type3

Now, to link these 2 I have a "linking" table:

LinkingTable:
ItemID ; ItemTypeID
1 ; 100
1 ; 200
2 ; 100
2 ; 300

Now I want to select all the items of type 100 or 200...

How can I do that without getting a duplicate row of item 1??

Thanks in advance,
Danny
 




 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
tan13V112 Thu Jul 24 5:37:42 CDT 2008.