Results 1 to 3 of 3

Thread: joining 3 tables RESOLVED

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    334

    joining 3 tables RESOLVED

    is there anything wrong with this query???
    SELECT Employee.Name, Customer.Fname, PIHeader.* FROM PIHeader JOIN Employee ON PIHeader.EmployeeID = Employee.Employee ID JOIN (Customer ON PIHeader.CustomerID = Customer.CustomerID)

    THIS IS RIGHT
    Last edited by pame1la; Apr 4th, 2005 at 04:24 AM.

  2. #2
    Lively Member smartrajesh's Avatar
    Join Date
    Feb 2005
    Posts
    94

    Re: joining 3 tables

    hai,
    what is ur need..can u explain it....

    regards
    Rajesh ^ ^
    * *
    ()

  3. #3
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: joining 3 tables

    Quote Originally Posted by pame1la
    is there anything wrong with this query???
    SELECT
    Employee.Name,
    Customer.Fname,
    PIHeader.*
    FROM
    PIHeader JOIN Employee ON PIHeader.EmployeeID = Employee.Employee ID JOIN (Customer ON PIHeader.CustomerID = Customer.CustomerID)
    Um nope... why?

    EDIT: YES see bold bit
    The bracket should be next to PIHeader.Cust...

    Maybe :
    Code:
    SELECT 
       Employee.Name, 
       Customer.Fname, 
       PIHeader.* 
    FROM 
      (PIHeader LEFT JOIN Employee ON PIHeader.EmployeeID = Employee.Employee ID) 
    LEFT JOIN Customer ON PIHeader.CustomerID = Customer.CustomerID
    Last edited by Ecniv; Apr 4th, 2005 at 04:36 AM.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

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