SoStyle.chi_description AS chi_description,

SoStyle.description AS eng_description,
SoStyle.chi_quality AS chi_quality,
SoStyle.quality_text AS quality_text

在添加以下长字段查询时,报错:不能比较或排序 text、ntext 和 image 数据类型,除非使用 IS NULL 或 LIKE 运算符

后在每个字段中加MAX();

又报错:操作数数据类型 ntext 对于 max 运算符无效

最后将其转换成

MAX(CONVERT(NVARCHAR(1000), soStyle.chi_description)) AS chi_description,
MAX(CONVERT(NVARCHAR(1000), soStyle.description)) AS eng_description,
MAX(CONVERT(NVARCHAR(1000), soStyle.chi_quality)) AS chi_quality,
MAX(CONVERT(NVARCHAR(1000), soStyle.quality_text)) AS quality_text

编译通过

相关文章:

  • 2020-11-12
  • 2021-10-07
猜你喜欢
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2021-10-06
  • 2021-04-30
  • 2021-09-30
  • 2021-08-01
相关资源
相似解决方案