-- Create table
create table adam.FCO_INTEGRADA_RT05
(
  COMPANIA         CHAR(4) not null,
  ANIO             NUMBER not null,
  MES              NUMBER not null,
  SUCURSAL         VARCHAR2(10) not null,
  TIPO_PLANILLA    CHAR(1) not null,
  COD_ARP          VARCHAR2(6) not null,
  SECUENCIA        NUMBER not null,
  NIT              VARCHAR2(16) not null,
  DV               CHAR(1) not null,
  SUMA_APORTES     NUMBER(10) not null,
  NRO_AUT          VARCHAR2(15) not null,
  INCAPACIDADES    NUMBER(10) not null,
  OTROS_RIESGOS    NUMBER(10) not null,
  NETO_APORTES     NUMBER,
  DIAS_MORA        NUMBER not null,
  INT_MORA         NUMBER(10) not null,
  SUBTOTAL_APORTES NUMBER,
  NRO_RADICACION   VARCHAR2(10) not null,
  SALDO_FAVOR      NUMBER(10) not null,
  TOTAL_PAGAR      NUMBER,
  FSRP             NUMBER(10) not null,
  TOTAL_AFILIADOS  NUMBER(6) not null,
  ORIGEN           NUMBER(1) null
)
tablespace TS_ADAMDATOS
;
-- Create/Recreate primary, unique and foreign key constraints 
alter table adam.FCO_INTEGRADA_RT05
  add constraint PK_FCO_INTEGRADA_RT05 primary key (COMPANIA,ANIO,MES,SUCURSAL,TIPO_PLANILLA,COD_ARP)
  using index 
  tablespace TS_ADAMINDICES
;
-- Grant/Revoke object privileges 
