Hi, Use LEFT JOIN instead =
Bye and Good Luck! --- Mark Colvin <[EMAIL PROTECTED]> wrote: > I want to select from three tables where there may > or may not be a record in > the third table. Table 1 and 2 have a one to one > relationship and table 1 > and 2 both have a one to many relationship with > table three. All three > tables have a column called 'code' and I want to > select where code is in > table one and table1.code = table2.code and > table1.code = table3.code. I > also want the records that are in table 1 and 2 but > do not have any any > record(s) in table three. Is it possible to build a > query that would get the > results into one recordset? I have tried various > queries that don't quite > return what I need. I hope this makes some sort of > sense. > > > **************************************************** > This e-mail is intended for the recipient only and > may contain confidential information. If you are > not the intended recipient then you should reply > to the sender and take no further ation based > upon the content of the message. > Internet e-mails are not necessarily secure and > CCM Limited does not accept any responsibility > for changes made to this message. > Although checks have been made to ensure this > message and any attchments are free from viruses > the recipient should ensure that this is the case. > **************************************************** > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list > archive) > > To request this thread, e-mail > <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php