Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update syntax with Replace and Cast
Message
 
 
À
06/04/2015 16:41:30
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01617831
Message ID:
01617854
Vues:
16
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform