Results 1 to 2 of 2

Thread: table1.field=table2.field

  1. #1
    Join Date
    Dec 1969

    Default table1.field=table2.field

    I have a query such as:<BR><BR>SELECT tblSchedule.ID, POTD, fdate, ftitle, ftime, tblSchedule.fprogram, tblSchedule.fepisode FROM tblSchedule, tblEpisodic WHERE tblSchedule.fepisode = tblEpisodic.fepisode ORDER BY ftime<BR><BR>On my page i list records with:<BR><BR>While NOT rsUpdate.eof<BR> Display fprogram<BR> blah blah<BR> Display ftitle<BR>Loop<BR><BR>The problem is, when the query finds an fepisode which is not in the tblEpisodic table it does not display anything about that record.<BR><BR>I want the page to display this record&#039;s details from tblSchedule even if the query does not match the record in tblEpisodic.<BR><BR>Any help appreciated.<BR><BR>regards.

  2. #2
    Join Date
    Dec 1969

    Default RE: table1.field=table2.field

    SELECT S.ID, S.POTD, fdate, ftitle, ftime, S.fprogram, S.fepisode <BR>FROM tblSchedule S LEFT OUTER JOIN tblEpisodic E ON S.fepisode = E.fepisode <BR>ORDER BY ftime<BR><BR>When you do select from table, other table you actually do an INNER JOIN, what you need is an outer join

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts