Forcing Tables

Results 1 to 2 of 2

Thread: Forcing Tables

  1. #1
    Join Date
    Dec 1969

    Default Forcing Tables

    I have two tables <BR><BR>table 1 - firstname, lastname and ordernumber <BR>table 2 - ordernumber, order <BR><BR>I want to put these two tables into one table showing not only the matching ordernumbers between them, but also all of the firstnames and lastnames, whether they have an ordernumber or not. Like this:<BR><BR>table 3 - firstname, lastname, ordernumber, order <BR><BR><BR>Please help.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Forcing Tables

    SELECT firstname,lastname,t1.Ordernumber,t2.Order FROM table1 t1 LEFT OUTER JOIN<BR>table2 t2 on t1.Ordernumber = t2.Ordernumber<BR><BR>the LEFT OUTER join assures that the fname and lname are displayed even when there&#039;s no corresponding record in table2

Posting Permissions

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