I have a UDF called Trim() that basically takes a varchar(8000) parameter and does an LTRIM() RTRIM() on it and returns it back.
I'm getting a 'Cannot resolve collation conflict on concatenation operation.' error from it when I try to use it in a PRINT statement that involves printing another string that is the result of a CAST():
PRINT 'This be some text' + fn_trim( CAST( @mynumericvar AS char ))
I'm finding the topic of collation and strings overly complicated. Collation on all levels seems to be a huge pain in the a$$ to me. Is there something more straightforward I'm missing here? Thanks!