我有一个专栏A. 我希望看到A是否为空 我想在A的价值之前添加'great' 例如:
A has value of 100 than,
A should be great100
到目前为止我尝试了下面的代码,但传递错误“'CONCAT'不是公认的内置函数名”:
UPDATE #TABLE SET A = CONCAT('great', A) where A is not null
请帮我,如何连接,谢谢
我得到了答案,首先感谢大家
UPDATE #TABLE
SET A= 'great' + (A)
where A is not null
答案 0 :(得分:2)
试试这个:
UPDATE #TABLE
SET A = 'great' + value
where A is not null
答案 1 :(得分:1)
你在CASE声明中这样做:
select
CASE
WHEN A IS NOT NULL THEN 'Great' + CONVERT(varchar(10), A)
END as A_VALUE
from ......