数据类型 varchar 和 uniqueidentifier 在 add 运算符中不兼容

    select '<a href="/'+a.id +'" title="'+ a.title +'">'+a.Title+'</a>'
     from dbo.ticles a;

 

解决办法:

使用:  cast ,

修改之后:

 select '<a href="/'+cast(a.Id as varchar(8000))  from dbo.ticles  a; 

 

posted @ 2019-01-25 20:20  幽冥狂_七  阅读(1564)  评论(0编辑  收藏  举报