Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update syntax with Replace and Cast
Message
 
 
To
06/04/2015 16:41:30
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01617831
Message ID:
01617854
Views:
17
>>Right, but what again is the problem? You seems to be answering yourself and not me.
>
>The initial syntax was targeting a char field and was causing the problem. As Subject_E is a char field, the replace can be used as is without a cast. This was a bad cut & paste and it led to confusion. The original code was put back and still works. Body_E is the Varchar(MAX) field and that one is working with the usage of cast.
>
>Thanks

If Body_E is the varchar(max) column, you don't need a CAST.

If it's Text column, it needs a cast (one way only). In both cases the replace will be case-insensitive unless the column is defined with case sensitive collation.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform