开发者

SQL Server 2000:Invalid operator for data type. Operator equals add, type equals ntext

开发者 https://www.devze.com 2022-12-22 13:39 出处:网络
I\'ve got some code that runs all lovely on SQL Server开发者_C百科 2008, however I\'m forced to try it on SQL Server 2000 server, where it falls down.

I've got some code that runs all lovely on SQL Server开发者_C百科 2008, however I'm forced to try it on SQL Server 2000 server, where it falls down.

Basically I'm looking to combine two columns, with a comma in-between.

SELECT COALESCE(cardesc1, '') + ', ' + COALESCE(cardesc2, '') AS "Car Summary" FROM macros;


Solved it!

SELECT COALESCE(cardesc1, '') + ', ' + COALESCE(convert(varchar(100),cardesc2), '') AS "Car Summary" FROM macros;

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号