dep:
  - v_listes_1
src: |
  SELECT v_listes_1.liste_id_combo AS oid,
      v_listes_1.texte,
      v_listes_1.lvl AS level,
      ('0'::text || v_listes_1.sort) || chr(1) AS sort
     FROM activite.v_listes_1
    WHERE v_listes_1.table_code = 'GHS'::text AND v_listes_1.lvl <> '0'::text
  UNION ALL
   SELECT 'GH'::text || t_ghs_c.ghs_id::text AS oid,
      (COALESCE(t_ghs_c.ghs_code_text,'') || ' '::text) || t_ghs_c.ghs_texte AS texte,
      '1'::text AS level,
      '9'::text || to_char(t_ghs_c.ghs_code, 'FM0000'::text) AS sort
     FROM activite.t_ghs_c
    WHERE t_ghs_c.ghs_id <> 0 AND (t_ghs_c.ghs_id IN ( SELECT p_oids.oid
             FROM activite.p_oids
            WHERE p_oids.code_table = 'ghs'::text))
    ORDER BY 4;