Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Char(100) field VS Text
Message
 
To
19/04/2012 10:52:35
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01542085
Message ID:
01542117
Views:
21
>>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!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform