当前位置: 代码迷 >> Oracle开发 >> oracle不定队列统计
  详细解决方案

oracle不定队列统计

热度:69   发布时间:2016-04-24 06:34:58.0
oracle不定行列统计
现有值日表 ZRB

数据如下:

id          值日人员          房间号

1                   A                    1

2                   A,B                 2

3                   A,C                 1

4                   B,D                 3

5                   D                     4

6                   E                      5

要求实现如下统计,联合值日的,每个人各记录一次

值日人员            房间1              房间 2                 房间3                    房间4                 房间5                    合计

       A                       2                      1                                                                                                               3

       B                                               1                           1                                                                                  2

       C                       1                                                                                                                                       1

       D                                                                                                          1                                                    1

       E                                                                                                                                     1                         1

       。
       。
       。

值日人员很多,不限于A、B、C、D、E,希望给出不限于A,B,C,D,E的解法,谢谢了。
------解决思路----------------------
刚发现拼写错了,应该是REGEXP_SUBSTR
  相关解决方案