Oracle有关的字符串拼接

Oracle有关的字符串拼接

1.字符串与某一查询栏位简单的拼接:

Select 'KS3F' || a.Line_Name as Line_Name
  From Sfis1.c_Line_Desc_t a
 Where a.Line_Name Like '3SMT%'
View Code

2.字符串与某一查询栏位的截取拼接:

Select 'KS3F' || substr(a.Line_Name, 2, 4) as Line_Name
  From Sfis1.c_Line_Desc_t a
 Where a.Line_Name Like '3SMT%'
View Code

3.字符串与某一查询栏位的截取去空拼接:

Select 'KS3F' || trim(substr(a.Line_Name, 2, 8)) as Line_Name
  From Sfis1.c_Line_Desc_t a
 Where a.Line_Name Like '3SMT%'
View Code

 

posted @ 2020-04-21 15:22  码农阿亮  阅读(448)  评论(0编辑  收藏  举报