pour déploiement auto v2 via gitlab
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.
 
 

24 lines
955 B

src: |
( SELECT DISTINCT t_cmd.oid,
(t_cmd.code::text || ' '::text) || t_cmd.texte_court::text AS texte,
'1'::text AS level,
t_cmd.code,
'cmd'::text AS level_name
FROM pmsi.t_cmd,
pmsi.t_ghm
WHERE t_ghm.cmd_id = t_cmd.oid AND (t_ghm.oid IN ( SELECT DISTINCT p_rss.ghm_id
FROM pmsi.p_rss
ORDER BY p_rss.ghm_id))
ORDER BY t_cmd.oid, ((t_cmd.code::text || ' '::text) || t_cmd.texte_court::text), '1'::text, t_cmd.code, 'cmd'::text)
UNION
( SELECT DISTINCT t_ghm.oid,
(t_ghm.code::text || ' '::text) || t_ghm.texte::text AS texte,
'2'::text AS level,
t_ghm.code,
'ghm'::text AS level_name
FROM pmsi.t_ghm
WHERE (t_ghm.oid IN ( SELECT DISTINCT p_rss.ghm_id
FROM pmsi.p_rss
ORDER BY p_rss.ghm_id))
ORDER BY t_ghm.oid, ((t_ghm.code::text || ' '::text) || t_ghm.texte::text), '2'::text, t_ghm.code, 'ghm'::text)
ORDER BY 4;