You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
616 B

src: |
SELECT 'DT'::text || t_risque.oid::text AS oid,
(t_risque.code || ' - '::text) || t_risque.texte AS texte,
t_risque.code,
'1'::text AS level,
'8'::text || t_risque.code AS tri,
'0'::character(1) AS is_cti
FROM activite.t_risque
WHERE t_risque.oid = 0
UNION
SELECT 'DT'::text || t_risque.oid::text AS oid,
(t_risque.code || ' - '::text) || t_risque.texte AS texte,
t_risque.code,
'1'::text AS level,
'9'::text || t_risque.code AS tri,
'0'::character(1) AS is_cti
FROM activite.t_risque
WHERE t_risque.oid <> 0
ORDER BY 5;