Resolving variables are incompatible in the equal to operator error in SQL
Asked Answered
D

1

10

I am getting the following error in django model.objects.get_or_create.

SQLServer [FreeTDS][SQL Server]The data types nvarchar(max) and ntext
are incompatible in the equal to operator.

The column django is complaining about NVARCHAR(MAX) with null allowed in SQLServer.

The Django model element is defined as TextField(null=True)

Definitive answered 20/8, 2016 at 15:43 Comment(0)
A
0

Perhaps Sql-Server is converting the Django TextField to nText and trying to compare to nVarChar like this post answered.

https://mcmap.net/q/1169423/-getting-a-39-the-data-types-nvarchar-max-and-ntext-are-incompatible-in-the-equal-to-operator-39

Anyway answered 20/9, 2023 at 17:48 Comment(1)
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From ReviewCervix

© 2022 - 2025 — McMap. All rights reserved.