Oracle SQL - 合并两列

时间:2016-03-17 13:25:24

标签: sql oracle oracle11g

我正在寻求合并两列的结果,并在一列中查看:

select description1, description2 from daclog where description2 is not null;

结果两个注册表:

第1行:

DESCRIPTION1

Initialization scans sent to RTU 1, 32 bit mask: 0x00000048. Initialization mask bits are as follows: B0 - status dump, B1 - analog dump B2 - accumulator dump, B3 - Group Data Dump, B4 - accumulat 

(此处开始说明2)

  

,或冻结,B5 - 电源故障复位,B6 - 时间同步。

第二行:

DESCRIPTION1

Initialization scans sent to RTU 1, 32 bit mask: 0x00000048. Initialization mask bits are as follows: B0 - status dump, B1 - analog dump B2 - accumulator dump, B3 - Group Data Dump, B4 - accumulat

(此处开始说明2)

  

,或冻结,B5 - 电源故障复位,B6 - 时间同步。

然后我需要在同一列上的description1和description2的值。

有可能吗?

谢谢!

1 个答案:

答案 0 :(得分:1)

您可以使用tokens": tokens, "profile": profile, "notification": { "title": title, "message": message, "android": { "icon": "ic_stat_icon", "icon_color": "#99004C" }, "ios": { "badge": "1" } } 运算符将两列合并为一个。

||

如果您想使用每个描述中的一些子字符串,您可以使用字符串函数,然后合并结果。 select description1 || description2 as description from daclog where description2 is not null; 其中FNC可能是返回列的所需子字符串的函数。

相关问题