如何在字符串后面加入特定字符!

AthlonXP2000 2013-03-01 05:42:09
有一个cert表
有字段double_certsn,subject,certsn和cert_status
其中相同subject项的列会对应有2条以上的相同数据
double_certsn有的为空,有的不为空。
我想实现将ctml_name等于‘签名’的所有列的double_certsn为空的项,都填入数值,这个数值就是certsn后面加上四个零



在SQL中如下语句可以实现
update cert set double_certsn=convert(VARCHAR2(40),certsn)+'0000'
where double_certsn is null and cert_status='Use' and ctml_name like '%签名%'

但在oracle中提示缺少表达式
...全文
676 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
tonypingge 2013-03-01
  • 打赏
  • 举报
回复
字符串连接用 ||

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧