-- Create table
create table adam.FCO_INTEGRADA_RT03
(
  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_AFP              CHAR(10) not null,
  SECUENCIA            NUMBER not null,
  NIT                  VARCHAR2(16) not null,
  DV                   CHAR(1) not null,
  SUMA_APORTES         NUMBER(10) not null,
  SUMA_VOLUNTARIOS     NUMBER(10) not null,
  SUMA_VOLUNTARIOS_CIA NUMBER(10) not null,
  SUMA_FSP_SOL         NUMBER(10) not null,
  SUMA_FSP_SUB         NUMBER(10) not null,
  DIAS_MORA            NUMBER not null,
  INT_MORA_APORTES     NUMBER(10) not null,
  INT_MORA_FSP_SOL     NUMBER(10) not null,
  INT_MORA_FSP_SUB     NUMBER(10) not null,
  TOTAL_PAGAR          NUMBER,
  TOTAL_AFILIADOS      NUMBER(6) not null
)
tablespace TS_ADAMDATOS
;
-- Create/Recreate primary, unique and foreign key constraints 
alter table adam.FCO_INTEGRADA_RT03
  add constraint PK_FCO_INTEGRADA_RT03 primary key (COMPANIA,ANIO,MES,SUCURSAL,TIPO_PLANILLA,COD_AFP)
  using index 
  tablespace TS_ADAMINDICES
;
-- Grant/Revoke object privileges 
