CREATE OR REPLACE FORCE VIEW "AB03B"."AB03B39V00" ("ID_039", "TERRITORIO_039", "TERRITORIO_DO", "CALLE_039", "NUMERO_039", "PISO_039", "LETRA_039", "COD_POSTAL_039", "MUNICIPIO_039", "MUN_DO", "TELEFONO_039", "FAX_039", "DESC_ES_039", "DESC_EU_039", "ID_045_ORG", "DESC_ES_045", "DESC_EU_045", "REG_MANUAL_039", "EMAIL_039", "ID_PERFIL_039") AS 
  SELECT T39.ID_039,
    T39.TERRITORIO_039,
    NORAPROV.DS_O TERRITORIO_DO,
    T39.CALLE_039,
    T39.NUMERO_039,
    T39.PISO_039,
    T39.LETRA_039,
    T39.COD_POSTAL_039,
    T39.MUNICIPIO_039,
    NORAMUN.DS_O MUN_DO,
    T39.TELEFONO_039,
    T39.FAX_039,
    T39.DESC_ES_039,
    T39.DESC_EU_039,
    T39.ID_045_ORG,
    T45.DESC_ES_045,
    T45.DESC_EU_045,
    T39.REG_MANUAL_039,
    T39.EMAIL_039,
    T39.ID_PERFIL_039
  FROM AB03B39T00 T39
  INNER JOIN AB03B45T00 T45
  ON T45.ID_045 = T39.ID_045_ORG
  INNER JOIN T17I.T17_PROVINCIA NORAPROV
  ON NORAPROV.ID = T39.TERRITORIO_039
  INNER JOIN T17I.T17_MUNICIPIO NORAMUN
  ON NORAMUN.PROVINCIA_ID = T39.TERRITORIO_039
  AND NORAMUN.ID          = T39.MUNICIPIO_039;

CREATE OR REPLACE FORCE VIEW "AB03B"."AB03B49V00" ("ID_049", "TERRITORIO_049", "TERRITORIO_DO", "CALLE_049", "NUMERO_049", "PISO_049", "LETRA_049", "COD_POSTAL_049", "MUNICIPIO_049", "MUN_DO", "TELEFONO_049", "FAX_049", "DESC_ES_049", "DESC_EU_049", "ID_048_ORG", "DESC_ES_048", "DESC_EU_048", "REG_MANUAL_049", "EMAIL_049", "ID_PERFIL_049") AS 
  SELECT T49.ID_049,
    T49.TERRITORIO_049,
    NORAPROV.DS_O TERRITORIO_DO,
    T49.CALLE_049,
    T49.NUMERO_049,
    T49.PISO_049,
    T49.LETRA_049,
    T49.COD_POSTAL_049,
    T49.MUNICIPIO_049,
    NORAMUN.DS_O MUN_DO,
    T49.TELEFONO_049,
    T49.FAX_049,
    T49.DESC_ES_049,
    T49.DESC_EU_049,
    T49.ID_048_ORG,
    T48.DESC_ES_048,
    T48.DESC_EU_048,
    T49.REG_MANUAL_049,
    T49.EMAIL_049,
    T49.ID_PERFIL_049
  FROM AB03B49T00 T49
  INNER JOIN AB03B48T00 T48
  ON T48.ID_048 = T49.ID_048_ORG
  INNER JOIN T17I.T17_PROVINCIA NORAPROV
  ON NORAPROV.ID = T49.TERRITORIO_049
  INNER JOIN T17I.T17_MUNICIPIO NORAMUN
  ON NORAMUN.PROVINCIA_ID = T49.TERRITORIO_049
  AND NORAMUN.ID          = T49.MUNICIPIO_049;