1
select
2
a.tsjbxx_djrq,
3
b.sqxz_desc,
4
a.TSJBXX_TSNR,
5
a.TSJBXX_SSQX,
6
c.wtxz_mc,
7
decode(a.tsjbxx_Bjcsjg,'01','結案',
8
'02','跟蹤',
9
'03','改派',
10
'04','續辦',
11
'05','督辦',
12
a.tsjbxx_Bjcsjg) tsjbxx_Bjcsjg
13
14
/*
15
(CASE
16
WHEN a.TSJBXX_BJCSJG='01' THEN '結案'
17
WHEN a.TSJBXX_BJCSJG='02' THEN '跟蹤'
18
WHEN a.TSJBXX_BJCSJG='03' THEN '改派'
19
ELSE a.tsjbxx_Bjcsjg
20
END
21
)
22
*/
23
24
from tsgl_tsjbxx a ,code_sqxz b , code_wtxz c
25
26
where a.Tsjbxx_Wgxzfl= b.sqxz_code(+)
27
and a.TSJBXX_WGWTFL=c.wtxz_id(+)
------------------------------------
--select DISTINCT t.tsjbxx_blbm from tsgl_tsjbxx t
--select t.tsjbxx_blbm from tsgl_tsjbxx t group by tsjbxx_blbm
--------------------------------------------

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

------------------------------------
--select DISTINCT t.tsjbxx_blbm from tsgl_tsjbxx t
--select t.tsjbxx_blbm from tsgl_tsjbxx t group by tsjbxx_blbm
--------------------------------------------