CREATE OR REPLACE VIEW Q022YV00_01
(Q022YT00_NI, Q022YT00_COD, Q022YT00_DESC, Q022YT00_DESC_EUS, Q022YT00_COD_DESCC, 
 Q022YT00_COD_DESCE)
AS 
(SELECT Q022YT00_ni,
           Q022YT00_cod,           
           Q022YT00_desc,
           Q022YT00_desc_eus,
           Q022YT00_cod || '-' || Q022YT00_desc Q022YT00_cod_descc,           
           Q022YT00_cod || '-' || Q022YT00_desc_eus Q022YT00_cod_desce           
      FROM Q022XT00 cabecera,
           Q022YT00 elementos
     WHERE cabecera.Q022XT00_ni = elementos.Q022XT00_ni
       AND cabecera.Q022XT00_cod = 'HRC_TIPO_CON')
ORDER BY  Q022YT00_cod
/


CREATE OR REPLACE VIEW Q022YV00_02
(Q022YT00_NI, Q022YT00_COD, Q022YT00_DESC, Q022YT00_DESC_EUS, Q022YT00_COD_DESCC, 
 Q022YT00_COD_DESCE)
AS 
(SELECT Q022YT00_ni,
           Q022YT00_cod,           
           Q022YT00_desc,
           Q022YT00_desc_eus,
           Q022YT00_cod || '-' || Q022YT00_desc Q022YT00_cod_descc,           
           Q022YT00_cod || '-' || Q022YT00_desc_eus Q022YT00_cod_desce           
      FROM Q022XT00 cabecera,
           Q022YT00 elementos
     WHERE cabecera.Q022XT00_ni = elementos.Q022XT00_ni
       AND cabecera.Q022XT00_cod = 'HRU_FORMA')
ORDER BY  Q022YT00_cod
/


CREATE OR REPLACE VIEW Q022YV00_03
(Q022YT00_NI, Q022YT00_COD, Q022YT00_DESC, Q022YT00_DESC_EUS, Q022YT00_COD_DESCC, 
 Q022YT00_COD_DESCE)
AS 
(SELECT Q022YT00_ni,
           Q022YT00_cod,           
           Q022YT00_desc,
           Q022YT00_desc_eus,
           Q022YT00_cod || '-' || Q022YT00_desc Q022YT00_cod_descc,           
           Q022YT00_cod || '-' || Q022YT00_desc_eus Q022YT00_cod_desce           
      FROM Q022XT00 cabecera,
           Q022YT00 elementos
     WHERE cabecera.Q022XT00_ni = elementos.Q022XT00_ni
       AND cabecera.Q022XT00_cod = 'HRU_RESUL_ENC')
ORDER BY  Q022YT00_cod
/


CREATE OR REPLACE VIEW Q022YV00_04
(Q022YT00_NI, Q022YT00_COD, Q022YT00_DESC, Q022YT00_DESC_EUS, Q022YT00_COD_DESCC, 
 Q022YT00_COD_DESCE)
AS 
(SELECT Q022YT00_ni,
           Q022YT00_cod,           
           Q022YT00_desc,
           Q022YT00_desc_eus,
           Q022YT00_cod || '-' || Q022YT00_desc Q022YT00_cod_descc,           
           Q022YT00_cod || '-' || Q022YT00_desc_eus Q022YT00_cod_desce           
      FROM Q022XT00 cabecera,
           Q022YT00 elementos
     WHERE cabecera.Q022XT00_ni = elementos.Q022XT00_ni
       AND cabecera.Q022XT00_cod = 'HRU_SITU_INSP')
ORDER BY  Q022YT00_cod
/


CREATE OR REPLACE VIEW Q022YV00_05
(Q022YT00_NI, Q022YT00_COD, Q022YT00_DESC, Q022YT00_DESC_EUS, Q022YT00_COD_DESCC, 
 Q022YT00_COD_DESCE)
AS 
(SELECT Q022YT00_ni,
           Q022YT00_cod,           
           Q022YT00_desc,
           Q022YT00_desc_eus,
           Q022YT00_cod || '-' || Q022YT00_desc Q022YT00_cod_descc,           
           Q022YT00_cod || '-' || Q022YT00_desc_eus Q022YT00_cod_desce           
      FROM Q022XT00 cabecera,
           Q022YT00 elementos
     WHERE cabecera.Q022XT00_ni = elementos.Q022XT00_ni
       AND cabecera.Q022XT00_cod = 'HRU_RESUL_INSP')
ORDER BY  Q022YT00_cod
/


CREATE OR REPLACE VIEW Q022YV00_06
(Q022YT00_NI, Q022YT00_COD, Q022YT00_DESC, Q022YT00_DESC_EUS, Q022YT00_COD_DESCC, 
 Q022YT00_COD_DESCE)
AS 
(SELECT Q022YT00_ni,
           Q022YT00_cod,           
           Q022YT00_desc,
           Q022YT00_desc_eus,
           Q022YT00_cod || '-' || Q022YT00_desc Q022YT00_cod_descc,           
           Q022YT00_cod || '-' || Q022YT00_desc_eus Q022YT00_cod_desce           
      FROM Q022XT00 cabecera,
           Q022YT00 elementos
     WHERE cabecera.Q022XT00_ni = elementos.Q022XT00_ni
       AND cabecera.Q022XT00_cod = 'HRC_RAC_CON')
ORDER BY  Q022YT00_cod
/


CREATE OR REPLACE VIEW Q022YV00_07
(Q022YT00_NI, Q022YT00_COD, Q022YT00_DESC, Q022YT00_DESC_EUS)
AS 
(SELECT Q022YT00_ni,
           Q022YT00_cod,           
           Q022YT00_desc,
           Q022YT00_desc_eus
      FROM Q022XT00 cabecera,
           Q022YT00 elementos
     WHERE cabecera.Q022XT00_ni = elementos.Q022XT00_ni
       AND cabecera.Q022XT00_cod = 'HRC_ESTSOL_NORA')
ORDER BY  Q022YT00_ni
/


