In MS SQL, some queries show the following message:
"The data types varchar and ntext are incompatible in the equal operator."
The message occurs because non-integer fields are reported as NTEXT data type. On older versions of the ODBC driver, non-integer fields worked and the message was not displayed.
Steps to Reproduce
CREATE TABLE dbo.test_incident
short_description varchar(45) NULL,
// the following command fails:
SELECT short_description INTO test_incident FROM incident;
MS SQL error 402: The data types ntext and varchar are incompatible in the equal to operator
Casting the field to varchar makes it work correctly, for example:
SELECT cast(short_description as varchar) INTO test_incident FROM incident;
Related Problem: PRB1110116