TBL1
ID Value
1 A
2 B
3 C
TBL2
ID Value
1
2
3
UPDATE TBL1
SET TBL1.ID= TBL2.ID
FROM
TBL1 t1
INNER JOIN TBL2 t2
ON t1.Value= t2.Value
WHERE t2.ID like '1'
ID - nvarchar(200)
Value - ntext
My purpose is to fill TBL2 from TBL1
I cannot change the datatypes as the database is not my database.
When I wrote the above content, everything is supposed to be fine.
But I have this error message.
Msg 402, Level 16, State 1, Line 16
The data types ntext and ntext are incompatible in the equal to operator.
Any idea how to overcome this?
You purpose is to fill TBL2, but in your were filling tabl1 in your sample code .
And you want to set ID? Value?
try this?