• Your code works for me on both

    2008 (10.50.1600) Enterprise

    2012 (10.0.2100) Evaluation

    Both results are the same.

    $actionACTIONnamename

    INSERTADDEDcaseNULL

    I can reproduce your error by forcing an incorrect collation:

    CASE

    WHEN $action COLLATE Latin1_General_CI_AS = 'INSERT' COLLATE SQL_Latin1_General_Cp437_BIN THEN 'ADDED'

    WHEN $action = 'DELETE' THEN 'REMOVED'

    END ACTION

    Msg 468, Level 16, State 9, Line 12

    Cannot resolve the collation conflict between "SQL_Latin1_General_CP437_BIN" and "Latin1_General_CI_AS" in the equal to operation.



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort