Re: ADVICE: Best way to store multi values

2001-03-21 Thread jcmaes
You are building a "many to many" relationship. How to do it: * Each staff member should have an unique ID (eg StaffMember_ID) in the Staff table; * Each subject has an ID in the SubjectTitles table; * and you need a third table, with two fields: StaffMember_ID and SubjectTitle_ID, plus extra da

RE: ADVICE: Best way to store multi values

2001-03-21 Thread Cal Evans
you need a join table between the two tables. It would contain the primary keys of both tables. This way for any given staffID, you could have 0-n records that contain staffId & subjectTitles_id. To get all the subjectTitles for a given staff you would Select * from staff_subjectTitles where sta

Re: ADVICE: Best way to store multi values

2001-03-21 Thread Gerald L. Clark
Assuming you have table staff with an id and name, and title with id and title, You create a join table. Staff_id Title_id 1 1 1 2 2 1 2 3 Then: Select name,title FROM staff s , title t, jointable j WHERE s.id=j.staff_id AND j.title_id=t.id; Mark Worsdall wrote: > >

Re: ADVICE: Best way to store multi values

2001-03-20 Thread Mark Worsdall
Hi, Thanks for all the advice, one question, the create a JOIN table, you mean just create a table, is the naming convention for join tables something like:- join_jobTitles In other words prefix all join tables with join_? M. In message <[EMAIL PROTECTED]>, Gerald L. Clark <[EMAIL PROTECTE