
April 21st, 2004, 07:32 AM
|
|
Contributing User
|
|
Join Date: Feb 2004
Location: Over there -->
Posts: 49
Time spent in forums: 4 h 45 m 53 sec
Reputation Power: 5
|
|
Mtm SQL query trouble
right here's one thats been wrecking my head for about 2 days long!
3 tables.
Skill- rid,title
Group - rid,title
mtmSkill2Group - rid,group_id,skill_rid
in table skill we have a list of skills
in group we have 4 different groups to which skills will belong
mtmSkill2Group is the linking table between them. It has primary key rid and foreign keys group_rid and skill_rid.
im trying to write a query to print a list of skills for each group.
ive tried something like this :
Code:
select s.title from Skill s where s.rid =
(select m.group_rid from mtmSkill2Group m where s.rid=m.skill_rid)
and god help me im getting mad results...im lost...someone please point me in the right direction with a line or too of the ol SQL!
Cheers,
damalo
|