IF OBJECT_ID('dbo.fco_cir_det') IS NOT NULL
    DROP TABLE dbo.fco_cir_det 
GO
CREATE TABLE dbo.fco_cir_det
(
    id_rep smallint NOT NULL,
    usuariow varchar(30) NOT NULL,
    cod_rep tinyint NOT NULL,  
    compania char(4) NOT NULL,
    sucursal char(10) NOT NULL,
    anio smallint NOT NULL,
    numero smallint NOT NULL,
    trabajador char(10) NOT NULL,
    fecha_desde smalldatetime NOT NULL,
    fecha_hasta smalldatetime NOT NULL,
    casilla tinyint NOT NULL,
    valor decimal(19,6),
    dato1 varchar(10) NULL,
    dato2 varchar(10) NULL,
    dato3 varchar(10) NULL,
    Constraint pk_fco_cir_det Primary Key (id_rep, usuariow, cod_rep, compania, sucursal, anio, numero, casilla)
)
GO
GRANT ALL ON fco_cir_det TO PUBLIC
GO
