D.Post (11/13/2012)
Hi,The only thing I can think of is replacing:
ON( Target.name = Source.name )
with
ON( Target.name COLLATE Latin1_General_CI_AS = Source.name COLLATE Latin1_General_CI_AS )
Hope this helps.
Yes, and no 😉
First: I'm aware of the COLLATE clause to overcome differences in collating stuff.
Second: the error isn't on the JOIN condition, but on the CASE-part where I check the $action field.
So the COLLATE clause should go there.
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.
As far as I'm concerned: this is a bug 😉
I've got SQL Server Days coming up, and I'm going to relate this issue to some of the speakers.
"Walking on water and developing software from a specification are easy if both are frozen." -- Edward V. Berard, "Life-Cycle Approaches"