Try grouping by the JobID Chris Tifer
----- Original Message ----- From: "Sam Thompson" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Tuesday, October 01, 2002 7:44 AM Subject: Re: quick database design question > I want to only display the job once, but I need to inner join the other > tables so i can display the location to the user. It doesnt really matter > which location I display, as long as the actual job is only listed once. > > Does that make sense? > > Thanks, Sam > > > (Tore, this is a carry on from my question on friday about group > by/cartesian product ...thanks for your replies on that.) > > ----- Original Message ----- > From: "Bostrup, Tore" <[EMAIL PROTECTED]> > To: "ActiveServerPages" <[EMAIL PROTECTED]> > Sent: Tuesday, October 01, 2002 2:51 PM > Subject: RE: quick database design question > > > > What results are you looking for, and what does your query look like? > > > > An inner join on the three tables would give you every job at every > > location. If that is not what you want to show, you have to add other > > criteria to limit your result set, or not join the tables if you are only > > looking for job info and not location info. > > > > HTH, > > Tore. > > > > -----Original Message----- > > From: Sam Thompson [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, October 01, 2002 5:15 AM > > To: ActiveServerPages > > Subject: Re: quick database design question > > > > > > Cheers! > > > > The reason I ask is because when I run a query against the job table, and > I > > inner join the locations and locations lookup table I get the same job > > listed many times, presumably because it is listed many times in the > > locations lookup table. > > > > Any ideas on how I can stop it being listed multiple times? > > > > Thanks > > > > Sam > > > > ----- Original Message ----- > > From: "Daniel Field" <[EMAIL PROTECTED]> > > To: "ActiveServerPages" <[EMAIL PROTECTED]> > > Sent: Tuesday, October 01, 2002 9:48 AM > > Subject: RE: quick database design question > > > > > > > Yep, looks ok to me! > > > > > > -----Original Message----- > > > From: Sam Thompson [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, October 01, 2002 09:45 > > > To: ActiveServerPages > > > Subject: quick database design question > > > > > > > > > I just wanna double check that im doing the right thing! > > > > > > Ive got a database which contains job vacancies, and each job can be in > > > multiple locations around the world. > > > > > > So I need 3 tables right? > > > > > > 1 containing the job ID, job title etc, another containing the list of > > > locations and a location ID, and the last one which contains the job ID > > and > > > the location ID (lookup table). > > > > > > Is that the correct way of doing it? > > > > > > Thanks! > > > > > > Sam Thompson > > > > > > > > > --- > > > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > > > To unsubscribe send a blank email to > > > %%email.unsub%% > > > > > > _____________________________________________________________________ > > > This e-mail has been scanned for viruses by the WorldCom Internet > Managed > > > Scanning Service - powered by MessageLabs. For further information visit > > > http://www.worldcom.com > > > > > > > > > > > > _____________________________________________________________________ > > > This e-mail has been scanned for viruses by the WorldCom Internet > Managed > > Scanning Service - powered by MessageLabs. For further information visit > > http://www.worldcom.com > > > > > > --- > > > You are currently subscribed to activeserverpages as: > > [EMAIL PROTECTED] > > > To unsubscribe send a blank email to > > %%email.unsub%% > > > > > > > > > --- > > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to > > %%email.unsub%% > > > > --- > > You are currently subscribed to activeserverpages as: > [EMAIL PROTECTED] > > To unsubscribe send a blank email to > %%email.unsub%% > > > --- > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
