Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Join expression not supported

    Hello!

    I'm haveing problems constructing JOIN part of my SELECT statement (in MS Access) - I have 2 tables, one with list of persons and one with list of countries. In persons table there are 2 columns that contain country code.
    Code:
    PERSONS       COUNTRIES
    ---------       -----------
    PersonID        CountryID
    ...                 CountryName
    Country1ID
    Country2ID
    I have constructed JOIN like the one below, but i ceep getting "Join expression not supported" error.
    Code:
    ...FROM 
        (persons LEFT JOIN countries ON persons.Country1ID = countries.CountryID) 
          LEFT JOIN countries ON persons.Country2ID = countries.CountryID
    Any idea?

    Thanks,
    Bostjan

  • #2
    New Coder
    Join Date
    Sep 2005
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try this
    Code:
    .... FROM (persons AS p LEFT JOIN Countries AS c1 ON c1.CountryID=p.Country1ID) LEFT JOIN Countries AS c2 ON c2.CountryID=p.Country1ID
    work together - make world a better place
    Outsource to India
    Web Design India
    Affordable Web hosting

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have tried this, but i get "Type mismatch in expression." error

  • #4
    New Coder
    Join Date
    Sep 2005
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try printing this statement and run he resultant query directly from query analyser... if it works fine.. then problem is probably somewhere else... which seems to be the case from the error that you've posted.
    work together - make world a better place
    Outsource to India
    Web Design India
    Affordable Web hosting

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It now works - thanks.
    I made a typing mistake.


  •  

    Posting Permissions

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