• Chrissy321 (3/21/2013)


    SELECT * FROM @test1

    WHERE

    Field1 + CONVERT(varchar(1),Field2) NOT IN

    (

    SELECT Field1 + CONVERT(varchar(1),Field2) FROM @Test2

    )

    SELECT * FROM @test1 t2

    WHERE NOT EXISTS (SELECT 1 FROM @Test2 t2 WHERE t1.Field1 = t2.Field1 AND t1.Field2 = t2.Field2)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass