Results 1 to 5 of 5
  1. #1
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419

    LEFT join query - right table doesn't appear returns #Error

    I did a left join query to show everything on the left table, however if something on the right table doesn't appear. The field returns #Error.



    How do I get rid of it ?

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What is the SQL? I'd expect Null, not an error. Are you doing a calculation?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    actually is like a calculation.
    What I have with the table from the right is a number in % and then I convert it into a value by using this function val(field) - (to do field1-field2).
    After that, when I run the query all the ones that didn't match are in #Error.

  4. #4
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    I actually got it to remove the error by doing some iif statements - such as iif field1 is > 0 and isnumeric(field2) then field1-field2.

    However, I got some weird calculations

    -- 23.98 - 24 = -2.000000000000031
    -- 50.99 - 51 = -9.999999999999999


    I don't know why, it should have been -.02 for the first one, and -.01 for the second one.

    -- 25.03 - 25 = 3.0000000000000000000

    should be .03

    I don't know why, if someone could explain ?

  5. #5
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What is the actual SQL or calculation?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Left join doesn't work correctly
    By jpunja in forum Queries
    Replies: 3
    Last Post: 10-31-2016, 04:16 PM
  2. Left Join Query returns invalid results
    By darike in forum Queries
    Replies: 13
    Last Post: 09-07-2016, 06:51 AM
  3. Replies: 3
    Last Post: 06-30-2014, 12:53 AM
  4. Replies: 3
    Last Post: 02-02-2011, 01:00 PM
  5. Error using left join accessing 2 active connections
    By peterg2000 in forum Programming
    Replies: 0
    Last Post: 10-05-2009, 05:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums