Table Join Question?

Results 1 to 3 of 3

Thread: Table Join Question?

  1. #1
    Raleigh Guest

    Default Table Join Question?

    I need the correct syntax for an join command in the following situation.<BR><BR>I have a table (Table 1) that has 4 Fields:<BR><BR>Autonum___Type__Partnum____Quanty<B R><BR>And a table (Table 2) that has 3<BR><BR>Autonum___Partnum__Descript<BR><BR><BR>I want to Join the partnum from the first table with the description of the second table and show the description on an HTML table next to where a partnum is shown. Not all partnumbers are shown on the table just user selected partnums.<BR><BR><BR>Thanks -<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Table Join Question?

    So do a join on table1.autonum = table2.autonum and table1.partnum = table2.partnum. If you need a WHERE clause (for, say, user selected partnums), put it after your FROM (which contains your joins).

  3. #3
    Alan Flaherty Guest

    Default RE: Table Join Question?

    Try this should work<BR><BR>SELECT table1.Type, table1.Partnum, table1.Quanty, table2.Partnum, table2.Descript FROM table1 <BR>INNER JOIN table2 ON table1.Partnum=table2.Partnum ;<BR>

Posting Permissions

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