Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Char(100) field VS Text
Message
 
À
19/04/2012 10:52:35
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01542085
Message ID:
01542117
Vues:
22
>>I don't use nVarChar types because my applications do not require unicode support.
>>
>>AFAIK varchar type is alive and well - no deprecation on it. If unicode support is not required then varchar saves space over nvarchar.
>
>Well, this message says "The data types text and varchar are incompatible in the equal to operator.". So, are you able to do a where clause with an exact match on a VarChar field. Because, I can't.

If the string you are trying to find in the varchar field is a TEXT field or TEXT variable, you'll need to cast it to a Varchar(MAX) or varchar(some reasonable length) type before comparing.

All the error is telling you is that you can not mix varchar and TEXT types in a comparison. TEXT is just an odd type (one of the reasone to avoid if possible).
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform