|
|
src: |
|
|
|
SELECT 'I'::text || t_ipa.categorie_code::text AS code,
|
|
|
CASE
|
|
|
WHEN t_ipa.categorie_code <> ''::bpchar THEN ((t_ipa.categorie_texte || ' ('::text) || t_ipa.categorie_code::text) || ')'::text
|
|
|
ELSE 'Non saisi'::text
|
|
|
END AS texte,
|
|
|
CASE
|
|
|
WHEN t_ipa.categorie_code <> ''::bpchar THEN ((t_ipa.categorie_texte_court || ' ('::text) || t_ipa.categorie_code::text) || ')'::text
|
|
|
ELSE 'Non saisi'::text
|
|
|
END AS texte_court
|
|
|
FROM base.t_ipa
|
|
|
WHERE t_ipa.oid <> 0
|
|
|
UNION
|
|
|
SELECT 'S'::text || t_ipa.categorie_code::text AS code,
|
|
|
CASE
|
|
|
WHEN t_ipa.categorie_code <> ''::bpchar THEN ((('SAUF '::text || t_ipa.categorie_texte) || ' ('::text) || t_ipa.categorie_code::text) || ')'::text
|
|
|
ELSE 'SAUF Non saisi'::text
|
|
|
END AS texte,
|
|
|
CASE
|
|
|
WHEN t_ipa.categorie_code <> ''::bpchar THEN ((('SAUF '::text || t_ipa.categorie_texte_court) || ' ('::text) || t_ipa.categorie_code::text) || ')'::text
|
|
|
ELSE 'SAUF Non saisi'::text
|
|
|
END AS texte_court
|
|
|
FROM base.t_ipa
|
|
|
WHERE t_ipa.oid <> 0
|
|
|
ORDER BY 1;
|