• Since there is no error message posted I'd assume you need to set the collation for the MI alias used to compare against your subquery too:

    and(RTRIM(LTRIM(MI.CLNT_MATT_CODE)) COLLATE SQL_Latin1_General_CP1_CI_AI NOT IN

    (SELECT PROJECT_CD

    FROM INT_AUX_PROJECT AS IAP

    WHERE (DELETE_IND = 0)))



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]