CREATE OR REPLACE FORCE VIEW "AB03B"."AB03B29V01" ("ID28", "OID", "NOMDOCUMENTO", "TIPODOCDOKUSI", "DESCDOCES", "DESCDOCEU", "OBSERVES", "OBSERVEU") AS 
  select t29.ID_028_HISTO_TRAM, t29.OID_029, T07.DESC_EU_007, T07.DESC_ES_007, T27.DESC_ES_027, T27.DESC_EU_027, t29.OBSERVACIONES_ES_029, t29.OBSERVACIONES_EU_029
  FROM AB03B29t00 t29
  INNER JOIN ab03b27t00 t27 ON t27.ID_027 = t29.ID_027_TIPO_DOC_G
  INNER JOIN AB03B07T00 T07 ON T07.ID_007 = T27.ID_007_TP_DOC_DOKUSI;
CREATE OR REPLACE FORCE VIEW "AB03B"."AB03B24V00TRAMITE" ("IDANO024", "ID024", "IDPROV024", "ID028", "NUMREG024", "ID_EXPEDIENTE", "FECREG024", "NIFSOLICITANTE024", "TIPODOC044", "NIFEMPRESA047", "RAZONSOCIAL047", "REPRESENTANTELEGAL047", "TELF1047", "TELF2047", "EMAIL047", "REQLEIDO024", "NOTIFLEIDA024", "EXP_CERRADO_024", "IDIOMACOMUNIC024", "ID017FASE", "FASE_DESC", "FASE_DESE", "ID018TRAMITE", "TRAMITE_DESC", "TRAMITE_DESE", "ID035ESTADO", "DESCES035", "DESCEU035", "ID047", "OBSERVACIONES028") AS 
  SELECT T24.ID_ANO_024,    T24.ID_024,    T24.ID_PROV_024,    T28.ID_028,    T24.NUM_REG_024,    T24.ID_PROV_024    || '/'
    || T24.ID_ANO_024    || '/'    || lpad(T24.ID_024,5,'0'),    T24.FEC_REG_024,  T24.NIF_SOLICITANTE_024,   T47.TIPO_DOC_044,    T47.NIF_EMPRESA_047,
    T47.RAZON_SOCIAL_047,    T47.REPRESENTANTE_LEGAL_047,    T47.TELF1_047,    T47.TELF2_047,    T47.EMAIL_047,
    T24.REQ_LEIDO_024,    T24.NOTIF_LEIDA_024,    T24.EXP_CERRADO_024,    T24.IDIOMA_COMUNIC_024,
    T28.ID_017_FASE,    FASES.DESC_ES_017 FASE_DESC,    FASES.DESC_EU_017 FASE_DESE,    T28.ID_018_TRAMITE,
    TRAMITES.DESC_ES_018 TRAMITE_DESC,    TRAMITES.DESC_EU_018 TRAMITE_DESE,    T28.ID_035_ESTADO,    T35.DESC_ES_035,
    T35.DESC_EU_035,    T47.id_047,    t28.OBSERVACIONES_028
FROM AB03B28T00 t28
INNER JOIN AB03B24T00 T24 ON T24.ID_PROV_024 = t28.ID_PROV_024 AND T24.ID_ANO_024 = t28.ID_ANO_024 AND T24.ID_024 = t28.ID_024_NUM_EXP
INNER JOIN AB03B17T00 FASES ON FASES.ID_017 = t28.ID_017_FASE
INNER JOIN AB03B18T00 TRAMITES ON TRAMITES.ID_017_FASE = t28.ID_017_FASE AND TRAMITES.ID_018 = t28.ID_018_TRAMITE
INNER JOIN AB03B35T00 T35 ON T35.ID_035 = t28.ID_035_ESTADO
INNER JOIN AB03B47T00 T47 ON T47.ID_047 = T24.ID_047_EMPRESA;