SQL Searching 2 Tables

Results 1 to 4 of 4

Thread: SQL Searching 2 Tables

  1. #1
    Machine Guest

    Default SQL Searching 2 Tables

    I have a database with 2 seperate tables for "Contacts" [MgtContacts & EmpContacts]. When new registrants register for their respective tables, I would like the ASP/SQL code to look through both tables for duplicate email addresses, usernames & passwords before successfully registering. I know how to do this with one table but not 2 (or more).<BR><BR>Question 1: Can it be done?<BR>Question 2: How?<BR><BR>Thank You In Advance

  2. #2
    Dave Stuart Guest

    Default RE: SQL Searching 2 Tables

    If both tables have identical fieldnames then you can do a straight UNION to join them together. Or you could do a left or right join on the e-mails address.

  3. #3
    Machine Guest

    Default RE: SQL Searching 2 Tables

    The tables will not be identical.<BR><BR>Is there some resource on the web that I can learn about "UNION" and "...left to right..."?<BR><BR>Thanks

  4. #4
    Dave Stuart Guest

    Default RE: SQL Searching 2 Tables

    E-mail me at developer@acadiaweb.com and I will send you a sample mdb as I have just done something similar for one of my customers.

Posting Permissions

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