• Keven,

    Even though I work at MS I'm just a developer in same as you when it comes to stuff like this.

    You stated that "In the Original table there is a NULL row". What do you mean by that? Do you mean that one of the records has a NULL value for the Name field? If so that record sure wouldn't come back as expected. I just ran the following and it works as expected (Win2k3 SQL2k SP3a Latin1_General_Bin collation)...

    SET NOCOUNT ON

    IF EXISTS(SELECT * FROM sysobjects WHERE id = object_id('Upload'))

        DROP TABLE Upload

    CREATE TABLE Upload

    (Name    nvarchar(255))

    IF EXISTS(SELECT * FROM sysobjects WHERE id = object_id('Original'))

        DROP TABLE Original

    CREATE TABLE Original

    (Name    nvarchar(255))

    INSERT INTO Upload

    VALUES('ODYSSEY AMERICA RE')

    INSERT INTO Upload

    VALUES('ODYSSEY REINSURANCE CORP.')

    INSERT INTO Original

    VALUES('ODYSSEY AMERICAN REINSURANCE CO.')

    INSERT INTO Original

    VALUES('ODYSSEY RE (LONDON) LTD.')

    INSERT INTO Original

    VALUES('ODYSSEY REINSURANCE CORP.') 

    SELECT DISTINCT(Name)

    FROM Upload

    WHERE

    Name NOT IN (SELECT Name FROM Original)

    SELECT DISTINCT(u.Name)

    FROM Upload u

        LEFT JOIN Original o ON u.Name = o.Name

    WHERE o.Name IS NULL

    returns

    Name               

    --------------------

    ODYSSEY AMERICA RE

    Name               

    --------------------

    ODYSSEY AMERICA RE




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.