db2数据库sql语句字符串拼接

最近在使用db2中时,一段sql 需要拼接字符串,不能直接使用  + ,需要使用拼接符号是||

如下是我的拼接语句:

select WENJIANBIAOTI as 公文标题,WENZHONG||'['||NIANDAI||']'||SHOUWENHAO as 收文号,LAIWENHAO as 文号,
LAIWENDANWEI as 来文单位,LAIWENRIQI as 来文日期 from OLD_OA_SHOUWEN_BASE 
where LAIWENHAO like '%2008%'
and SHOUWENORGID like '%0000%'
order by LAIWENHAO ,LAIWENRIQI

你可能感兴趣的:(db2,sql)