1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| SELECT
xt.*
,im.file_number AS FileN
,per.inss AS niss
,im.OVERALL_START_DATE
,im.MESSAGE_ID
FROM
inbox_messages im
INNER JOIN persons per ON per.person_id = im.person_id
,XMLTABLE
(NAMESPACES('https://appprod.be' AS tns), '$doc/tns:certificate/Body/FPSDossier/MedicalAppraisement',
PASSING XMLTYPE.CREATEXML(im.CONTENT) AS doc
COLUMNS
ScaleScore NUMBER PATH 'ScaleScore'
,Column1 NUMBER PATH 'Column1'
,Column2 NUMBER PATH 'Column2'
,Column3 NUMBER PATH 'Column3'
--,BeginDate DATE PATH 'BeginDate'
--,EndDate DATE PATH 'EndDate'
) AS xt
WHERE im.TYPE = 'T002'
AND im.overall_start_date BETWEEN '01/06/2020' AND '30/11/2020'
ORDER BY niss
; |
Partager