gpt4 book ai didi

sql - 将 string+ntext 转换为 nvarchar 错误

转载 作者:行者123 更新时间:2023-12-02 17:07:21 24 4
gpt4 key购买 nike

我正在尝试转换与以下 sql 命令连接的字符串和列值:

 CAST('Strign:'+[KlirAn] as NVARCHAR(max))

执行此命令后,我收到以下错误:

    Msg 402, Level 16, State 1, Line 1
The data types varchar and ntext are incompatible in the add operator.

请问有什么帮助吗?

最佳答案

尝试以下操作:

'String:'+ CAST([KlirAn] as NVARCHAR(max))

关于sql - 将 string+ntext 转换为 nvarchar 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17523593/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com