+ Reply to Thread
Results 1 to 3 of 3

Null values get matched in Full Outer Join query. Can we stop this?

  1. #1
    Registered User
    Join Date
    02-13-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    Null values get matched in Full Outer Join query. Can we stop this?

    Hello everyone. Any help with the following is very much appreciated.

    I am trying to join two queries using a single matching column as criterion. Unfortunately some cells are empty and have null values. When I run a Full Outer Join query, Excel matches null values as well which make no sense.
    Is there a way to stop Excel from doing that so that non-matching rows are just added as extra rows in the merged table without any shared columns?
    I have attached a basic example to help you understand my problem.
    Attached Files Attached Files
    Last edited by XLn3wb; 10-25-2016 at 01:14 PM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Null values get matched in Full Outer Join query. Can we stop this?

    Null values would get matched in a full outer join in normal SQL, it's the same as a left join and a right join. You'd want Inner join for only matching rows.

    As to why PQ matches on null (which it seems to do), I've no idea - you could put a dummy emp id in to fix it so -1 for example in one table

  3. #3
    Registered User
    Join Date
    02-13-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    Thumbs up Re: Null values get matched in Full Outer Join query. Can we stop this?

    Hi Kyle,

    Thank you very much for your answer. You know I am embarrassed to say it but actually it never occurred to me to assign a dummy empty ID. Very good tip and I am sure it will do the trick.
    In the past I have successfully used Full Outer Joins without repeating empty cells but the caveat is that they had multiple matching columns. The multiple column criteria produced zero probability (in my case) of multiple null rows matching and therefore I never faced this issue before.

    Going forward I think your tip is great and from now on I will assign different "Empty" IDs to each table just to be on the safe side.

    Thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to remove null values from several columns with Power Query?
    By toblju in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2016, 11:08 AM
  2. MS Query - Left Outer Join to Subquery possible??
    By Wannabe Guru in forum Access Tables & Databases
    Replies: 2
    Last Post: 06-14-2013, 02:23 AM
  3. Query Help - ambiguous outer join
    By jammy1812 in forum Access Tables & Databases
    Replies: 3
    Last Post: 10-18-2012, 09:43 AM
  4. Full outer join of data across two workbooks based on a common column
    By godric7gt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2012, 02:23 AM
  5. Is Null not working! Tried Outer Join and that's not working either...
    By TLiles in forum Access Tables & Databases
    Replies: 5
    Last Post: 01-05-2011, 01:30 PM
  6. Access SQL Full Outer Join Into Different Table
    By davegugg in forum Access Programming / VBA / Macros
    Replies: 0
    Last Post: 02-24-2010, 02:18 PM
  7. [SOLVED] How do you stop excel from charting empty cells/null values as zer
    By Abe-air in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-20-2006, 08:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1