create or replace view vw_fco_integrada_rt05 as
select compania,
       anio,
       mes,
       sucursal,
       tipo_planilla,
       secuencia,
       '05' || ltrim(to_char(secuencia, '00000')) ||
       lpad(cod_ARP, 6, ' ') || ltrim(to_char(nit, '0000000000000000')) || dv ||
       ltrim(to_char(suma_aportes, '0000000000')) ||
       lpad(nro_aut, 15, ' ') ||
       ltrim(to_char(incapacidades, '0000000000')) ||
       ltrim(to_char(otros_riesgos, '0000000000')) ||
       ltrim(to_char(nvl(neto_aportes, 0), '0000000000')) ||
       ltrim(to_char(dias_mora, '0000')) ||
       ltrim(to_char(int_mora, '0000000000')) ||
       ltrim(to_char(nvl(subtotal_aportes, 0), '0000000000')) ||
       '0'||rtrim(lpad(nro_radicacion, 10, '0')) ||
       ltrim(to_char(saldo_favor, '0000000000')) ||
       ltrim(to_char(nvl(total_pagar, 0), '0000000000')) ||
       ltrim(to_char(FSRP, '0000000000')) ||
       ltrim(to_char(total_afiliados, '000000')) registro
  from fco_integrada_rt05