文本列上的SQL INNER JOIN [英] SQL INNER JOIN on Text Columns

查看:53
本文介绍了文本列上的SQL INNER JOIN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个要在其上进行 INNER JOIN 的表(设备和软件).他们都有一个名为EQCN的字段.它是一个文本字段.我收到以下错误:

I have two tables (equipment & software) that I want to do an INNER JOIN on. They both have a field called EQCN. It is a text field. I get the following error:

文本和文本的数据类型在等于运算符时是不兼容的.

The data types text and text are incompatible in the equal to operator.

必须解决这一问题.

推荐答案

将这些列的数据类型更改为 varchar(max).

Change the data types for these columns to varchar(max).

来自Microsoft :

ntext,text和image数据类型将在以后的版本中删除Microsoft SQL Server.避免在新数据中使用这些数据类型开发工作,并计划修改当前使用的应用程序他们.改用nvarchar(max),varchar(max)和varbinary(max).

ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead.

这篇关于文本列上的SQL INNER JOIN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆