• Your DBA dropped PUBS on your DEV box? Bit over-zealous isn't he/she? I can understand and agree in production, but pubs and northwind can be very handy in dev/test environments.

    Hope these results post ok...

     
    
    select * from authors a
    where NOT EXISTS (select * from titleauthor ta where ta.au_id = a.au_id)

    (3 row(s) affected)

    StmtText
    -----------------------------------------------------------------------------------------------------------------------------
    |--Nested Loops(Left Anti Semi Join, OUTER REFERENCES:([a].[au_id]))
    |--Compute Scalar(DEFINE:([a].[mvgtest]=substring([a].[au_lname], 1, 10)))
    | |--Clustered Index Scan(OBJECT:([pubs].[dbo].[authors].[UPKCL_auidind] AS [a]))
    |--Index Seek(OBJECT:([pubs].[dbo].[titleauthor].[auidind] AS [ta]), SEEK:([ta].[au_id]=[a].[au_id]) ORDERED FORWARD)

    (4 row(s) affected)

    StmtText
    -----------------------------------------------------------------------------------------------------------

    select * from titles t
    where NOT EXISTS (select * from titleauthor ta where ta.title_id = t.title_id)

    (1 row(s) affected)

    StmtText
    --------------------------------------------------------------------------------------------------------------------------------------
    |--Nested Loops(Left Anti Semi Join, OUTER REFERENCES:([t].[title_id]))
    |--Clustered Index Scan(OBJECT:([pubs].[dbo].[titles].[UPKCL_titleidind] AS [t]))
    |--Index Seek(OBJECT:([pubs].[dbo].[titleauthor].[titleidind] AS [ta]), SEEK:([ta].[title_id]=[t].[title_id]) ORDERED FORWARD)

    (3 row(s) affected)

    StmtText
    ------------------------------------------------------------------------------------------------------------------------------

    select * from titles t
    where NOT EXISTS (select * from titleauthor ta where upper(ta.title_id) = upper(t.title_id))

    (1 row(s) affected)

    StmtText
    ---------------------------------------------------------------------------------------------
    |--Nested Loops(Left Anti Semi Join, WHERE:(upper([ta].[title_id])=upper([t].[title_id])))
    |--Clustered Index Scan(OBJECT:([pubs].[dbo].[titles].[UPKCL_titleidind] AS [t]))
    |--Index Scan(OBJECT:([pubs].[dbo].[titleauthor].[titleidind] AS [ta]))

    (3 row(s) affected)


    Cheers,
    - Mark