Re: Help with a tough query

2004-03-16 Thread Brent Baisley
Egads you're right! I've been overthinking this. There must something else wrong in my query. Thanks for the hit over the head. I needed it. On Mar 16, 2004, at 10:37 AM, Harald Fuchs wrote: When you specify a left join, you will always get the same number of records as are in your primary joi

Re: Help with a tough query

2004-03-16 Thread Brent Baisley
The DISTINCT key word works on the whole record, not the field that follows it. So the query actually does return multiple records with the same EventID when there are multiple related contacts/regardings. DISTINCT filters out duplicate records created from the joining of the three tables. Whe

Re: Help with a tough query

2004-03-15 Thread Peter Brawley
Brent, >The problem I run into with my current query is that it fails when >there are no contacts or regardings for an event. Is this possible in a >single query? Here is a short version of my current query. >SELECT DISTINCT EventID, Contact.Name, Regarding.Name >FROM Events, Contacts, Regarding >

Re: Help with a tough query

2004-03-15 Thread Brent Baisley
You're right, it doesn't "fail", it just fails to give me the desired results. Left joining won't work because it will only grab one record from contacts and/or regarding if one exists, when there could be many. Thanks for the suggestion though. Thanks On Mar 15, 2004, at 4:47 PM, Rhino wrote

Re: Help with a tough query

2004-03-15 Thread Rhino
Remarks interspersed below. Rhino - Original Message - From: "Brent Baisley" <[EMAIL PROTECTED]> To: "MYSQL list" <[EMAIL PROTECTED]> Sent: Monday, March 15, 2004 4:32 PM Subject: Help with a tough query > I didn't think this was too hard when I first created it, but now that > I'm loa