开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜