• marc.snoeys (11/13/2012)


    D.Post (11/13/2012)


    CASE

    WHEN $action = 'INSERT' THEN 'ADDED'

    WHEN $action = 'DELETE' THEN 'REMOVED'

    END ACTION

    BUT: the question was rather why there is a difference in behavior between a PARTIALLY CONTAINED database and a NON-PARTIALLY CONTAINED database.

    Here is one possible explanation as to what is going on:

    In the contained database scenario $action is actually collated using the catalog default, i.e. Latin1_General_100_CI_AS_WS_KS_SC, per the table under the section Contained Databases in this article. Try adding COLLATE DATABASE_DEFAULT to collate $action in the CASE expression.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato