Results 1 to 3 of 3

Thread: Help using two tables

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Posts
    118

    Post

    Hi ,
    I have two tables, one has partnumbers,phonenumber,quanity and ponumber.The other has phonenumber,first name, last name, and cellphone.How do i use these two tables together? What I want is to be able to keep the tables sepearte because of duplicate information.However I need to be able to search for partnumbers,names,and phonenumbers.when I search for these items I want to then show all items that this customer has in my database.
    Any help would be appreciated.

    ------------------

  2. #2
    Lively Member
    Join Date
    Jun 1999
    Location
    Raleigh, NC
    Posts
    70

    Post

    Having duplicate information in a database is generally not a good thing. A better design might be to have the name and phone numbers in one table, the PO info in the other with a foreign key linking it to the first table. For a given person, you could then get the record from the person table and display that on your form, then grab all records in the PO table associated with that person.

    You might want to look up Referential Integrity in the Access help.

    Hope this helps
    Bash

  3. #3
    Guest

    Post

    Use a SQL Statement like

    SELECT Partnumber, Name FROM Table1 T1, Table2 T2
    WHERE PhoneNumber1 = SearchedPhoneNumber AND PhoneNumber1 = PhoneNumber2

    In JetSql35.hlp youll find examples

    Etoscha

Posting Permissions

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



Click Here to Expand Forum to Full Width