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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link two tables

Status
Not open for further replies.

nat35

Programmer
Nov 10, 2002
86
0
0
AU
Hi there,
I have a field with multiple selection Field(122,3).
How can i link to another table where those numbers are id's
table1 table2
Field1 Field1
122,3 122
3

thank you
 
nat35,

Not sure how this would look (I'm away from the big iron right now), but

select * from table2 where field1 in (select field1 from table1)

The idea being that the parser creates a comma-delimited list of the field contents, so perhaps the commas in the field will mesh with the commas created by the parser.

Failing that, you'd have to do some dynamic SQL to construct the IN clause. It'd be even more of a stretch to do the join in the other direction.

HTH,

Phil Hegedusich
Senior Web Developer
IIMAK
-----------
Boy howdy, my Liberal Studies degree really prepared me for this....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top