Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Location
    BC Canada
    Posts
    61

    Unanswered: Multiple Table Queries

    I am having propblems creating a multiple table query for a stored procedure.

    Here is what I have..

    db1 = transaction database with multipke fields keyed on transid, and membid

    db2 = transaction legal details keyed on transid & legalid

    db3 = member details keyed on membid & officeid

    db4 = office details keyed on officeid & membid

    What I am after is a query which will result in ALL details being returned for a particular transaction

    ie. transaction detail, legal detail, member detail & office detail...

    please help

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    something like...

    Code:
    select db1.*, db2.*, db3.*, db4.*
      from db1
      join db2 on db1.transid  = db2.transid
      join db3 on db1.membid   = db3.membid
      join db4 on db3.officeid = db4.officeid
    Paul Young
    (Knowledge is power! Get some!)

  3. #3
    Join Date
    Oct 2002
    Location
    BC Canada
    Posts
    61
    Thanks, worked like a charm.

    Much Obliged.. have more queries to do for this project, I am sure I will have more posts for you.

Posting Permissions

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