Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    3

    Unanswered: DTS Query Builder - Using nulls

    I am trying to emulate the "Find unmatched Records" Access Query using DTS. I have a small table with a list of codes that I need to use to exclude records in my text export.

    I have created a left outer join and set the criteria for the joined field in the 'right' table to be null. I am repeatedly getting no records as a result.

    Wouldn't the joined field in the right table for unmatched records by default be null? I'm stumped as to why this seamingly simple process won't work for me. I have attached the select statement for your review.

    Any help would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2004
    Location
    Romania - Bucharest
    Posts
    50
    Maybe you should re-design your query using the "where exists" or "where not exists" construct

    something like:

    select a, b from table1
    where not exists (select * from table2 where table1.key = table2.key)

  3. #3
    Join Date
    Jan 2004
    Posts
    3
    Thanks. That worked like a charm.

Posting Permissions

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