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

joining

Status
Not open for further replies.

goransaler

IS-IT--Management
Mar 6, 2003
56
SE
Hello

I am wondering if this is possible

table1

id name
1 aaaa
2 bbbb
3 cccc


table2
id Category
1 cata
2 catb
3 catc


table3
id tabel1id tabel2id
1 1 1
2 1 3
3 2 1
4 2 2
5 3 2
6 3 3



my thinking is about that if in this example the category fields is very long and they repeat in the table2.
Is it not possible to link them like this and if it's so
How do i do

 
Yes that is possible you just modeled a many to many relationship

minus your statement of "... they repeat in the table2"
you shouldn't have actual items repeat in table2. Table 1 and 2 should be unique
 
ok
but is it corect to do a table to link it together

and if it's so how do i do
maybe

SELECT table1.name FROM table1



SELECT table2.id, table2.Category
FROM table2
INNER JOIN table3 ON table2.ID = table3.tabel2id
INNER JOIN table1 ON table3.tabel1id = table1.ID


i will use this on a form
and thats why i use two select
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top