SQL Changing the Result from blank to something

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DGroenewald
    New Member
    • Jun 2007
    • 1

    SQL Changing the Result from blank to something

    I'm using SQL Query Analyzer 2000
    My script looks at the entries in Table1 and compares it to Table2, if there are certain entries from Table1 not in Table2 it returns those entries to me. This part works fine.
    What I need is for the result to return a value if all the entries are in both tables. What happens is that if all the entries are in both tables, the result is empty, NOT NULL but empty.
    Here's my script.

    select ENTRY from TABLE1
    where code = '137'
    and ENTRY NOT IN
    (select ENTRY from TABLE2
    where code = '137'
    and date >= '20070501'
    and date < '20070601')
    Last edited by DGroenewald; Jun 8 '07, 02:47 PM. Reason: More Details
Working...