SQL> select
2 DECODE (TNOT_NOTICE_TYPE,
3 '1200', 'Duration Challenge ',
4 '1400', 'Informal Overrun Warning ',
5 '1500', 'Works Comments ',
6 '1600', 'Direction on Timing ',
7 '1601', 'Direction on Placing Apparatus ',
8 '1602', 'Undue Delay ',
9 '1611', 'Grant Permit ',
10 '1613', 'Refuse Permit ',
11 '2100', 'FPN Notice ',
12 '2101', 'FPN Withdrawal ',
13 '2200', 'FPN Comments ',
14 '2600', 'Inspection ',
15 '2800', 'Temporary Traffic Signal Application Responses '
16 ) || 'Received' AS "Subject",
17 DECODE (TNOT_NOTICE_TYPE,
18 '1200', 'Duration Challenge - ',
19 '1400', 'Informal Overrun Warning - ',
20 '1500', 'Works Comments - ',
21 '1600', 'Direction on Timing - ',
22 '1601', 'Direction on Placing Apparatus - ',
23 '1602', 'Undue Delay - ',
24 '1611', 'Grant Permit - ',
25 '1613', 'Refuse Permit - ',
26 '2100', 'FPN Notice - ',
27 '2101', 'FPN Withdrawal - ',
28 '2200', 'FPN Comments - ',
29 '2600', 'Inspection - ',
30 '2800', 'Temporary Traffic Signal Application Responses - '
31 ) || SUBSTR(TNOT_WORKS_REF, 3, 3) AS "Alert Description",
32 SUBSTR(TNOT_WORKS_REF, 3, 3) AS "District" ,
33 TNOT_SENDER_ORG_REF as "Org Ref",
34 TNOT_SENDER_DIST_REF as "Dist Ref",
35 TNOT_DATE_MODIFIED as "Date Modified",
36 TNOT_DATE_MODIFIED as "Date Modified",
37 TNOT_WORKS_REF as "Works Ref",
38 TNOT_COMMENTS as "Comments",
39 TNOT_WORKS_DESCRIPTION AS "Works Description",
40 TNOT_LOC_DESCRIPTION AS "Location Description",
41 TNOT_NOTICE_TYPE ,
42 TNOT_CREATED_DATIM
43 from TMA_NOTICES
44 where
45 TNOT_SENT_RECEIVED = 'R'
46 AND TNOT_WORKS_REF LIKE 'AY009%'
47 AND TNOT_NOTICE_TYPE IN ('1200','1400', '1500', '1600', '1601', '1602', '16
11', '1613', '2100', '2101', '2200','2600', '2800')
48 AND TNOT_CREATED_DATIM BETWEEN '01-OCT-19 00:00:00' and SYSDATE
49 ORDER BY TNOT_NOTICE_TYPE, TNOT_CREATED_DATIM DESC;
AND TNOT_CREATED_DATIM BETWEEN '01-OCT-19 00:00:00' and SYSDATE
*
**** ОШИБКА в строке 48:
ORA-01830: изображение в формате даты заканчивается перед преобразованием всей входной строки ****
SQL>