Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to select records that are a group?

Status
Not open for further replies.

amota

Programmer
Nov 9, 2005
3
CO
Hi,

I have a table like this:

ITEMID CODE
1 1
1 2
1 3
2 1
2 3
2 4
3 1
3 2
4 3

where every item is a set of codes. For example,
ItemID 1 = (1,2,3)
ItemID 2 = (1,3,4)
ItemID 3 = (1,2)
ItemID 4 = (3)

How can I know if an item exists? For example, if (1,2,3) exists or if (1,2) exists?

I'm working with a MySQL Database, and VB.Net application.

Thanks.
 
Since you are using MySQL a better place to ask the question would be the MySQL forum (


“I sense many useless updates in you... Useless updates lead to fragmentation... Fragmentation leads to downtime...Downtime leads to suffering..Fragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top