SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10035](
	[CIdRegistroPatronal] [int] IDENTITY(1,1) NOT NULL,
	[CRFC] [varchar](4) NULL,
	[CFechaConstitucion] [datetime] NULL,
	[CHomoclave] [varchar](3) NULL,
	[CTimeStamp] [datetime] NULL,
	[CRFCCompleto] [varchar](19) NULL,
	[CregistroIMSS] [varchar](19) NULL,
 CONSTRAINT [PK_nom10035] PRIMARY KEY CLUSTERED 
(
	[CIdRegistroPatronal] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXREGISTROIMSS] ON [dbo].[Nom10035] 
(
	[CregistroIMSS] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXRFCCOMPLETO] ON [dbo].[Nom10035] 
(
	[CRFCCompleto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10019](
	[IDEmpleado] [int] NOT NULL,
	[Fecha] [datetime] NOT NULL,
	[TipoSueldo] [char](1) NOT NULL,
	[Sueldo] [float] NULL,
	[CIdPeriodo] [int] NULL,
	[CIdTipoPeriodo] [int] NULL,
 CONSTRAINT [PK_nom10019] PRIMARY KEY CLUSTERED 
(
	[IDEmpleado] ASC,
	[Fecha] ASC,
	[TipoSueldo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXEMPLEADOFECHA] ON [dbo].[Nom10019] 
(
	[IDEmpleado] DESC,
	[Fecha] DESC,
	[TipoSueldo] DESC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOTIPO] ON [dbo].[Nom10019] 
(
	[IDEmpleado] ASC,
	[TipoSueldo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOTIPOPERIODO] ON [dbo].[Nom10019] 
(
	[IDEmpleado] ASC,
	[CIdTipoPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10023](
	[IDTipoPeriodo] [int] IDENTITY(1,1) NOT NULL,
	[NombreTipoPeriodo] [varchar](40) NULL,
	[DiasDelPeriodo] [int] NULL,
	[DiasDePago] [float] NULL,
	[PeriodoTrabajo] [int] NULL,
	[ModificarHistoria] [bit] NOT NULL CONSTRAINT [DF_Nom10023_ModificarHistoria]  DEFAULT ((0)),
	[AjustarPeriodosCalendario] [bit] NOT NULL CONSTRAINT [DF_Nom10023_AjustarPeriodosCalendario]  DEFAULT ((0)),
	[NumeroSeptimos] [int] NULL,
	[PosicionSeptimos] [varchar](30) NULL,
	[PosicionPagoNomina] [int] NULL,
	[FechaInicioEjercicio] [datetime] NULL,
	[Ejercicio] [int] NULL,
	[TimeStamp] [datetime] NULL,
	[CCalculoMesCalendario] [int] NULL,
 CONSTRAINT [PK_nom10023] PRIMARY KEY CLUSTERED 
(
	[IDTipoPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXDIASDELPERIODO] ON [dbo].[Nom10023] 
(
	[DiasDelPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDTIPOPERIODO] ON [dbo].[Nom10023] 
(
	[IDTipoPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXNOMBRETIPOPERIODO] ON [dbo].[Nom10023] 
(
	[NombreTipoPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10020](
	[IDBajaReingreso] [int] IDENTITY(1,1) NOT NULL,
	[IDEmpleado] [int] NULL,
	[ClaveBajaReingreso] [char](1) NULL,
	[Fecha] [datetime] NULL,
	[CIdPeriodo] [int] NULL,
	[CIdTipoPeriodo] [int] NULL,
 CONSTRAINT [PK_nom10020] PRIMARY KEY CLUSTERED 
(
	[IDBajaReingreso] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXEMPLEADO] ON [dbo].[Nom10020] 
(
	[IDEmpleado] ASC,
	[Fecha] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOFECHA] ON [dbo].[Nom10020] 
(
	[IDEmpleado] DESC,
	[Fecha] DESC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOFECHATIPOPER] ON [dbo].[Nom10020] 
(
	[IDEmpleado] ASC,
	[Fecha] ASC,
	[CIdTipoPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXPRIMARYKEY] ON [dbo].[Nom10020] 
(
	[Fecha] DESC,
	[ClaveBajaReingreso] DESC,
	[IDEmpleado] DESC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom1000x](
	[idmovtopdo] [int] NULL,
	[idperiodo] [int] NULL,
	[idempleado] [int] NULL,
	[idconcepto] [int] NULL,
	[idmovtopermanente] [int] NULL,
	[importetotal] [float] NULL,
	[valor] [float] NULL,
	[importe1] [float] NULL,
	[importe2] [float] NULL,
	[importe3] [float] NULL,
	[importe4] [float] NULL,
	[importetotalreportado] [bit] NOT NULL,
	[importe1reportado] [bit] NOT NULL,
	[importe2reportado] [bit] NOT NULL,
	[importe3reportado] [bit] NOT NULL,
	[importe4reportado] [bit] NOT NULL,
	[timestam_] [datetime] NULL
) ON [PRIMARY]


SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10002](
	[IDPeriodo] [int] IDENTITY(1,1) NOT NULL,
	[IDTipoPeriodo] [int] NULL,
	[NumeroPeriodo] [int] NULL,
	[Ejercicio] [int] NULL,
	[Mes] [int] NULL,
	[DiasDePago] [float] NULL,
	[Septimos] [int] NULL,
	[InterfazCheqpaqW] [bit] NOT NULL CONSTRAINT [DF_Nom10002_InterfazCheqpaqW]  DEFAULT ((0)),
	[ModificacionNeto] [bit] NOT NULL CONSTRAINT [DF_Nom10002_ModificacionNeto]  DEFAULT ((0)),
	[Calculado] [bit] NOT NULL CONSTRAINT [DF_Nom10002_Calculado]  DEFAULT ((0)),
	[Afectado] [bit] NOT NULL CONSTRAINT [DF_Nom10002_Afectado]  DEFAULT ((0)),
	[FechaInicio] [datetime] NULL,
	[FechaFin] [datetime] NULL,
	[InicioEjercicio] [bit] NOT NULL CONSTRAINT [DF_Nom10002_InicioEjercicio]  DEFAULT ((0)),
	[InicioMes] [bit] NOT NULL CONSTRAINT [DF_Nom10002_InicioMes]  DEFAULT ((0)),
	[FinMes] [bit] NOT NULL CONSTRAINT [DF_Nom10002_FinMes]  DEFAULT ((0)),
	[FinEjercicio] [bit] NOT NULL CONSTRAINT [DF_Nom10002_FinEjercicio]  DEFAULT ((0)),
	[TimeStamp] [datetime] NULL,
	[CFinBimestreIMSS] [bit] NOT NULL CONSTRAINT [DF_Nom10002_CFinBimestreIMSS]  DEFAULT ((0)),
	[CInicioBimestreIMSS] [bit] NOT NULL CONSTRAINT [DF_Nom10002_CInicioBimestreIMSS]  DEFAULT ((0)),
 CONSTRAINT [PK_nom10002] PRIMARY KEY CLUSTERED 
(
	[IDPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXIDEJERCICIO] ON [dbo].[Nom10002] 
(
	[IDTipoPeriodo] ASC,
	[Ejercicio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDEJERCICIOMES] ON [dbo].[Nom10002] 
(
	[IDTipoPeriodo] ASC,
	[Ejercicio] ASC,
	[Mes] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDEJERCICIONUMERO] ON [dbo].[Nom10002] 
(
	[IDTipoPeriodo] ASC,
	[Ejercicio] ASC,
	[NumeroPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDFECHAFIN] ON [dbo].[Nom10002] 
(
	[IDTipoPeriodo] ASC,
	[FechaFin] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDFECHAINICIO] ON [dbo].[Nom10002] 
(
	[IDTipoPeriodo] ASC,
	[FechaInicio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDFECHAS] ON [dbo].[Nom10002] 
(
	[IDTipoPeriodo] ASC,
	[FechaInicio] ASC,
	[FechaFin] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDMESEJERCICIO] ON [dbo].[Nom10002] 
(
	[IDTipoPeriodo] ASC,
	[Mes] ASC,
	[Ejercicio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDNUMERO] ON [dbo].[Nom10002] 
(
	[IDPeriodo] ASC,
	[NumeroPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDPERIODO] ON [dbo].[Nom10002] 
(
	[IDPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXNUMEROPERIODO] ON [dbo].[Nom10002] 
(
	[NumeroPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[nom100xx](
	[idempleado] [int] NOT NULL,
	[idtipoperiodo] [int] NOT NULL,
	[cidperiodo] [int] NOT NULL,
	[iddepartamento] [int] NULL,
	[idpuesto] [int] NULL,
	[idturno] [int] NULL,
	[estadocivil] [varchar](1) NULL,
	[umf] [int] NULL,
	[cuentapagoelectronico] [varchar](20) NULL,
	[sucursalpagoelectronico] [varchar](50) NULL,
	[bancopagoelectronico] [int] NULL,
	[estadoempleado] [varchar](1) NULL,
	[sueldodiario] [float] NULL,
	[fechasueldodiario] [datetime] NULL,
	[sueldovariable] [float] NULL,
	[fechasueldovariable] [datetime] NULL,
	[sueldopromedio] [float] NULL,
	[fechasueldopromedio] [datetime] NULL,
	[sueldointegrado] [float] NULL,
	[fechasueldointegrado] [datetime] NULL,
	[calculado] [bit] NOT NULL,
	[afectado] [bit] NULL,
	[calculadoextraordinario] [bit] NOT NULL,
	[afectadoextraordinario] [bit] NULL,
	[interfazcheqpaqw] [bit] NOT NULL,
	[modificacionneto] [bit] NOT NULL,
	[fechaalta] [datetime] NULL,
	[cuentacw] [varchar](31) NULL,
	[tipocontrato] [varchar](1) NULL,
	[basecotizacionimss] [varchar](1) NULL,
	[tipoempleado] [varchar](1) NULL,
	[basepago] [varchar](1) NULL,
	[formapago] [varchar](1) NULL,
	[zonasalario] [varchar](1) NULL,
	[modificacionsalarioimss] [bit] NOT NULL,
	[altaimss] [bit] NOT NULL,
	[bajaimss] [bit] NOT NULL,
	[cambiocotizacionimss] [bit] NOT NULL,
	[telefono] [varchar](20) NULL,
	[codigopostal] [int] NULL,
	[direccion] [varchar](60) NULL,
	[poblacion] [varchar](60) NULL,
	[estado] [varchar](20) NULL,
	[numeroafore] [varchar](50) NULL,
	[fechabaja] [datetime] NULL,
	[causabaja] [varchar](60) NULL,
	[sueldobaseliquidacion] [float] NULL,
	[campoextra1] [varchar](80) NULL,
	[campoextra2] [varchar](80) NULL,
	[campoextra3] [varchar](80) NULL,
	[fechareingreso] [datetime] NULL,
	[ajustealneto] [int] NULL,
	[timestamp] [datetime] NULL,
	[cidregistropatronal] [int] NULL,
	[cestadoempleadoperiodo] [varchar](4) NULL,
	[ccampoextranumerico1] [float] NULL,
	[ccampoextranumerico2] [float] NULL,
	[ccampoextranumerico3] [float] NULL,
	[ccampoextranumerico4] [float] NULL,
	[ccampoextranumerico5] [float] NULL,
	[cdiastrabajados] [float] NULL,
	[cdiaspagados] [float] NULL,
	[cdiascotizados] [float] NULL,
	[cdiasausencia] [float] NULL,
	[cdiasincapacidades] [float] NULL,
	[cdiasvacaciones] [float] NULL,
	[cdiaspropseptimos] [float] NULL,
	[chorasextras1] [float] NULL,
	[chorasextras2] [float] NULL,
	[chorasextras3] [float] NULL,
	[cfechasueldomixto] [datetime] NULL,
	[csueldomixto] [float] NULL,
	[cfechacorte] [datetime] NULL
) ON [PRIMARY]


SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10021](
	[IDTipoAcumulado] [int] IDENTITY(1,1) NOT NULL,
	[Nombre] [varchar](40) NOT NULL,
	[TipoMovtoAcumulado] [varchar](1) NOT NULL,
	[TimeStamp] [datetime] NULL,
 CONSTRAINT [PK_nom10021] PRIMARY KEY CLUSTERED 
(
	[IDTipoAcumulado] ASC,
	[Nombre] ASC,
	[TipoMovtoAcumulado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXNOMBRE] ON [dbo].[Nom10021] 
(
	[Nombre] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[NomBlobs](
	[Username] [varchar](15) NULL,
	[CodigoEmpleado] [varchar](40) NULL,
	[Numero] [float] NULL
) ON [PRIMARY]



CREATE UNIQUE NONCLUSTERED INDEX [IDXCODIGOEMPLEADO] ON [dbo].[NomBlobs] 
(
	[CodigoEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[NomDates](
	[Table] [varchar](255) NULL,
	[Date] [datetime] NULL
) ON [PRIMARY]


SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10005](
	[IDempleado] [int] NOT NULL,
	[IDConcepto] [int] NOT NULL,
 CONSTRAINT [PK_nom10005] PRIMARY KEY CLUSTERED 
(
	[IDempleado] ASC,
	[IDConcepto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXIDEMPLEADO] ON [dbo].[Nom10005] 
(
	[IDempleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10011](
	[IDEmpleado] [int] NOT NULL,
	[IDTipoAcumulado] [int] NOT NULL,
	[Ejercicio] [int] NOT NULL,
	[Importe1] [float] NULL,
	[Importe2] [float] NULL,
	[Importe3] [float] NULL,
	[Importe4] [float] NULL,
	[Importe5] [float] NULL,
	[Importe6] [float] NULL,
	[Importe7] [float] NULL,
	[Importe8] [float] NULL,
	[Importe9] [float] NULL,
	[Importe10] [float] NULL,
	[Importe11] [float] NULL,
	[Importe12] [float] NULL,
	[ImporteInicioEjercicio] [float] NULL,
	[ImporteEjercicioAnterior] [float] NULL,
 CONSTRAINT [PK_nom10011] PRIMARY KEY CLUSTERED 
(
	[IDEmpleado] ASC,
	[IDTipoAcumulado] ASC,
	[Ejercicio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXEJERCICIO] ON [dbo].[Nom10011] 
(
	[Ejercicio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADO] ON [dbo].[Nom10011] 
(
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOEJERCICIO] ON [dbo].[Nom10011] 
(
	[IDEmpleado] ASC,
	[Ejercicio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10003](
	[IDDepartamento] [int] IDENTITY(1,1) NOT NULL,
	[NumeroDepartamento] [int] NULL,
	[Descripcion] [varchar](40) NULL,
	[Beneficiario] [varchar](60) NULL,
	[CuentaCW] [varchar](31) NULL,
	[TimeStamp] [datetime] NULL,
	[CSegmentoNegocio] [int] NULL,
 CONSTRAINT [PK_nom10003] PRIMARY KEY CLUSTERED 
(
	[IDDepartamento] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXDESCRIPCION] ON [dbo].[Nom10003] 
(
	[Descripcion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXNUMERODEPARTAMENTO] ON [dbo].[Nom10003] 
(
	[NumeroDepartamento] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10012](
	[IDConcepto] [int] NOT NULL,
	[IDTipoAcumulado] [int] NOT NULL,
	[Tipo] [varchar](1) NOT NULL,
 CONSTRAINT [PK_nom10012] PRIMARY KEY CLUSTERED 
(
	[IDConcepto] ASC,
	[IDTipoAcumulado] ASC,
	[Tipo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXIDCONCEPTO] ON [dbo].[Nom10012] 
(
	[IDConcepto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10004](
	[IDConcepto] [int] IDENTITY(1,1) NOT NULL,
	[NumeroConcepto] [int] NULL,
	[TipoConcepto] [varchar](1) NULL,
	[Descripcion] [varchar](40) NULL,
	[Especie] [bit] NOT NULL CONSTRAINT [DF_Nom10004_Especie]  DEFAULT ((0)),
	[AutomaticoGlobal] [bit] NOT NULL CONSTRAINT [DF_Nom10004_AutomaticoGlobal]  DEFAULT ((0)),
	[AutomaticoLiquidacion] [bit] NOT NULL CONSTRAINT [DF_Nom10004_AutomaticoLiquidacion]  DEFAULT ((0)),
	[Imprimir] [bit] NOT NULL CONSTRAINT [DF_Nom10004_Imprimir]  DEFAULT ((0)),
	[Articulo86] [bit] NOT NULL CONSTRAINT [DF_Nom10004_Articulo86]  DEFAULT ((0)),
	[LeyendaImporte1] [varchar](40) NULL,
	[LeyendaImporte2] [varchar](40) NULL,
	[LeyendaImporte3] [varchar](40) NULL,
	[LeyendaImporte4] [varchar](40) NULL,
	[CuentaCW] [varchar](31) NULL,
	[TipoMovtoCW] [varchar](1) NULL,
	[ContraCuentaCW] [varchar](31) NULL,
	[ContabCuentaCW] [varchar](1) NULL,
	[ContabContraCuentaCW] [varchar](1) NULL,
	[LeyendaValor] [varchar](40) NULL,
	[FormulaImporteTotal] [text] NULL,
	[FormulaImporte1] [text] NULL,
	[FormulaImporte2] [text] NULL,
	[FormulaImporte3] [text] NULL,
	[FormulaImporte4] [text] NULL,
	[TimeStamp] [datetime] NULL,
 CONSTRAINT [PK_nom10004] PRIMARY KEY CLUSTERED 
(
	[IDConcepto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXDESCRIPCION] ON [dbo].[Nom10004] 
(
	[Descripcion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXNUMEROCONCEPTO] ON [dbo].[Nom10004] 
(
	[NumeroConcepto] ASC,
	[TipoConcepto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXTIPOCONCEPTO] ON [dbo].[Nom10004] 
(
	[TipoConcepto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10013](
	[IDTipoIncidencia] [int] NOT NULL,
	[IDTipoAcumulado] [int] NOT NULL,
 CONSTRAINT [PK_nom10013] PRIMARY KEY CLUSTERED 
(
	[IDTipoIncidencia] ASC,
	[IDTipoAcumulado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]


SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10006](
	[IDPuesto] [int] IDENTITY(1,1) NOT NULL,
	[NumeroPuesto] [int] NULL,
	[Descripcion] [varchar](40) NULL,
	[TimeStamp] [datetime] NULL,
 CONSTRAINT [PK_nom10006] PRIMARY KEY CLUSTERED 
(
	[IDPuesto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXDESCRIPCION] ON [dbo].[Nom10006] 
(
	[Descripcion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXNUMEROPUESTO] ON [dbo].[Nom10006] 
(
	[NumeroPuesto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10025](
	[IDPeriodo] [int] NOT NULL,
	[Fecha] [datetime] NOT NULL,
 CONSTRAINT [PK_nom10025] PRIMARY KEY CLUSTERED 
(
	[IDPeriodo] ASC,
	[Fecha] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXIDPERIODO] ON [dbo].[Nom10025] 
(
	[IDPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10007](
	[IDMovtoPDO] [int] IDENTITY(1,1) NOT NULL,
	[IDPeriodo] [int] NULL,
	[IDEmpleado] [int] NULL,
	[IDConcepto] [int] NULL,
	[IDMovtoPermanente] [int] NULL,
	[ImporteTotal] [float] NULL,
	[Valor] [float] NULL,
	[Importe1] [float] NULL,
	[Importe2] [float] NULL,
	[Importe3] [float] NULL,
	[Importe4] [float] NULL,
	[ImporteTotalReportado] [bit] NOT NULL CONSTRAINT [DF_Nom10007_ImporteTotalReportado]  DEFAULT ((0)),
	[Importe1Reportado] [bit] NOT NULL CONSTRAINT [DF_Nom10007_Importe1Reportado]  DEFAULT ((0)),
	[Importe2Reportado] [bit] NOT NULL CONSTRAINT [DF_Nom10007_Importe2Reportado]  DEFAULT ((0)),
	[Importe3Reportado] [bit] NOT NULL CONSTRAINT [DF_Nom10007_Importe3Reportado]  DEFAULT ((0)),
	[Importe4Reportado] [bit] NOT NULL CONSTRAINT [DF_Nom10007_Importe4Reportado]  DEFAULT ((0)),
	[TimeStamp] [datetime] NULL,
 CONSTRAINT [PK_nom10007] PRIMARY KEY CLUSTERED 
(
	[IDMovtoPDO] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXCONPEREMP] ON [dbo].[Nom10007] 
(
	[IDConcepto] ASC,
	[IDPeriodo] ASC,
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADO] ON [dbo].[Nom10007] 
(
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOPERIODO] ON [dbo].[Nom10007] 
(
	[IDPeriodo] ASC,
	[IDEmpleado] ASC,
	[IDConcepto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDPERIODO] ON [dbo].[Nom10007] 
(
	[IDPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXPERIODOCONCEPTO] ON [dbo].[Nom10007] 
(
	[IDPeriodo] ASC,
	[IDConcepto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10026](
	[Mes] [int] NOT NULL,
	[Dia] [int] NOT NULL,
	[Descripcion] [varchar](40) NULL,
 CONSTRAINT [PK_nom10026] PRIMARY KEY CLUSTERED 
(
	[Mes] ASC,
	[Dia] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]


SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10028](
	[NumeroTabla] [int] NOT NULL,
	[NumeroColumna] [int] NOT NULL,
	[Descripcion] [varchar](40) NULL,
	[TipoColumna] [varchar](1) NULL,
 CONSTRAINT [PK_nom10028] PRIMARY KEY CLUSTERED 
(
	[NumeroTabla] ASC,
	[NumeroColumna] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]


SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10029](
	[NumeroTabla] [int] NOT NULL,
	[NumeroColumna] [int] NOT NULL,
	[NumeroRenglon] [int] NOT NULL,
	[Valor] [float] NULL,
	[Fecha] [datetime] NULL,
 CONSTRAINT [PK_nom10029] PRIMARY KEY CLUSTERED 
(
	[NumeroTabla] ASC,
	[NumeroColumna] ASC,
	[NumeroRenglon] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]


SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10008](
	[IDMovtoPDO] [int] IDENTITY(1,1) NOT NULL,
	[IDPeriodo] [int] NULL,
	[IDEmpleado] [int] NULL,
	[IDConcepto] [int] NULL,
	[IDMovtoPermanente] [int] NULL,
	[ImporteTotal] [float] NULL,
	[Valor] [float] NULL,
	[Importe1] [float] NULL,
	[Importe2] [float] NULL,
	[Importe3] [float] NULL,
	[Importe4] [float] NULL,
	[ImporteTotalReportado] [bit] NOT NULL CONSTRAINT [DF_Nom10008_ImporteTotalReportado]  DEFAULT ((0)),
	[Importe1Reportado] [bit] NOT NULL CONSTRAINT [DF_Nom10008_Importe1Reportado]  DEFAULT ((0)),
	[Importe2Reportado] [bit] NOT NULL CONSTRAINT [DF_Nom10008_Importe2Reportado]  DEFAULT ((0)),
	[Importe3Reportado] [bit] NOT NULL CONSTRAINT [DF_Nom10008_Importe3Reportado]  DEFAULT ((0)),
	[Importe4Reportado] [bit] NOT NULL CONSTRAINT [DF_Nom10008_Importe4Reportado]  DEFAULT ((0)),
	[TimeStamp] [datetime] NULL,
 CONSTRAINT [PK_nom10008] PRIMARY KEY CLUSTERED 
(
	[IDMovtoPDO] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXCONPEREMP] ON [dbo].[Nom10008] 
(
	[IDConcepto] ASC,
	[IDPeriodo] ASC,
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADO] ON [dbo].[Nom10008] 
(
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOPERIODO] ON [dbo].[Nom10008] 
(
	[IDPeriodo] ASC,
	[IDEmpleado] ASC,
	[IDConcepto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDPERIODO] ON [dbo].[Nom10008] 
(
	[IDPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXPERIODOCONCEPTO] ON [dbo].[Nom10008] 
(
	[IDPeriodo] ASC,
	[IDConcepto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10000](
	[IDCptoPrimaVac] [int] NULL,
	[IDCptoAguinaldo] [int] NULL,
	[IDCptoPTU] [int] NULL,
	[IDCptoVacaciones] [int] NULL,
	[NombreCorto] [varchar](15) NULL,
	[RutaRespaldo] [varchar](255) NULL,
	[RutaContpaqW] [varchar](255) NULL,
	[RutaCheqpaqW] [varchar](255) NULL,
	[IDEmpresaContpaqW] [int] NULL,
	[Direccion] [varchar](60) NULL,
	[Telefono1] [varchar](20) NULL,
	[Telefono2] [varchar](20) NULL,
	[Telefono3] [varchar](20) NULL,
	[Fax] [varchar](20) NULL,
	[RegistroIMSS] [varchar](20) NULL,
	[RegistroCamara] [varchar](50) NULL,
	[RFC] [varchar](4) NULL,
	[Homoclave] [varchar](4) NULL,
	[RegistroInfonavit] [varchar](20) NULL,
	[RegistroFonacot] [varchar](20) NULL,
	[RegistroComisionMixta] [varchar](50) NULL,
	[RegistroSSA] [varchar](50) NULL,
	[ZonaSalarioGeneral] [varchar](1) NULL,
	[FechaInicioHistoria] [datetime] NULL,
	[FechaConstitucion] [datetime] NULL,
	[Ejercicio] [int] NULL,
	[PorcentajeSubsidio] [float] NULL,
	[CuentaCWGlobal] [varchar](31) NULL,
	[EstructuraCuentaCW] [varchar](9) NULL,
	[FormatoSobreRecibo] [varchar](255) NULL,
	[AfectarPeriodosAnteriores] [bit] NOT NULL CONSTRAINT [DF_Nom10000_AfectarPeriodosAnteriores]  DEFAULT ((1)),
	[AfectarPeriodosFuturos] [bit] NOT NULL CONSTRAINT [DF_Nom10000_AfectarPeriodosFuturos]  DEFAULT ((1)),
	[PosicionCuentaEmpleado] [int] NULL,
	[LongitudCuentaEmpleado] [int] NULL,
	[PosicionCuentaDepto] [int] NULL,
	[LongitudCuentaDepto] [int] NULL,
	[Localidad] [varchar](40) NULL,
	[NombreRepresentante] [varchar](40) NULL,
	[ApPaternoRepresentante] [varchar](40) NULL,
	[ApMaternoRepresentante] [varchar](40) NULL,
	[CodigoPostal] [int] NULL,
	[ApartadoPostal] [varchar](11) NULL,
	[MascarillaCodigo] [varchar](30) NULL,
	[NumeroDecimales] [int] NULL,
	[TipoCodigoEmpleado] [varchar](1) NULL,
	[MostrarAgenda] [bit] NOT NULL CONSTRAINT [DF_Nom10000_MostrarAgenda]  DEFAULT ((1)),
	[TimeStamp] [datetime] NULL,
	[IDCptoAjuste] [int] NULL,
	[IDCptoIndem20] [int] NULL,
	[IDCptoIndem90] [int] NULL,
	[IDCptoPrimaAntig] [int] NULL,
	[IDCptoPrimaVacRep] [int] NULL,
	[IDCptoSueldo] [int] NULL,
	[IDCptoVacRep] [int] NULL
) ON [PRIMARY]


SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10009](
	[IDMovtoDyH] [int] IDENTITY(1,1) NOT NULL,
	[IDPeriodo] [int] NULL,
	[IDEmpleado] [int] NULL,
	[IDTipoIncidencia] [int] NULL,
	[IDTarjetaIncapacidad] [int] NULL,
	[IDTControlVacaciones] [int] NULL,
	[Fecha] [datetime] NULL,
	[Valor] [float] NULL,
	[TimeStamp] [datetime] NULL,
 CONSTRAINT [PK_nom10009] PRIMARY KEY CLUSTERED 
(
	[IDMovtoDyH] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXEMPLEADO] ON [dbo].[Nom10009] 
(
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOFECHA] ON [dbo].[Nom10009] 
(
	[IDEmpleado] ASC,
	[Fecha] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOFECHADESC] ON [dbo].[Nom10009] 
(
	[IDEmpleado] DESC,
	[Fecha] DESC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOPERIODO] ON [dbo].[Nom10009] 
(
	[IDPeriodo] ASC,
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDFECHA] ON [dbo].[Nom10009] 
(
	[IDPeriodo] ASC,
	[Fecha] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE UNIQUE NONCLUSTERED INDEX [IDXIDMOVTODYH] ON [dbo].[Nom10009] 
(
	[IDMovtoDyH] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDPERIODO] ON [dbo].[Nom10009] 
(
	[IDPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDTARJETAINCAPACIDAD] ON [dbo].[Nom10009] 
(
	[IDTarjetaIncapacidad] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDTCONTROLVACACIONES] ON [dbo].[Nom10009] 
(
	[IDTControlVacaciones] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXPEREMPINC] ON [dbo].[Nom10009] 
(
	[IDPeriodo] ASC,
	[IDEmpleado] ASC,
	[IDTipoIncidencia] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXPEREMPINCFEC] ON [dbo].[Nom10009] 
(
	[IDPeriodo] ASC,
	[IDEmpleado] ASC,
	[IDTipoIncidencia] ASC,
	[Fecha] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10010](
	[IDMovtoDyH] [int] IDENTITY(1,1) NOT NULL,
	[IDPeriodo] [int] NULL,
	[IDEmpleado] [int] NULL,
	[IDTipoIncidencia] [int] NULL,
	[IDTarjetaIncapacidad] [int] NULL,
	[IDTControlVacaciones] [int] NULL,
	[Fecha] [datetime] NULL,
	[Valor] [float] NULL,
	[TimeStamp] [datetime] NULL,
 CONSTRAINT [PK_nom10010] PRIMARY KEY CLUSTERED 
(
	[IDMovtoDyH] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXEMPLEADO] ON [dbo].[Nom10010] 
(
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOFECHA] ON [dbo].[Nom10010] 
(
	[IDEmpleado] ASC,
	[Fecha] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOFECHADESC] ON [dbo].[Nom10010] 
(
	[IDEmpleado] DESC,
	[Fecha] DESC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOPERIODO] ON [dbo].[Nom10010] 
(
	[IDPeriodo] ASC,
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDFECHA] ON [dbo].[Nom10010] 
(
	[IDPeriodo] ASC,
	[Fecha] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDPERIODO] ON [dbo].[Nom10010] 
(
	[IDPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDTARJETAINCAPACIDAD] ON [dbo].[Nom10010] 
(
	[IDTarjetaIncapacidad] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDTCONTROLVACACIONES] ON [dbo].[Nom10010] 
(
	[IDTControlVacaciones] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXPEREMPINC] ON [dbo].[Nom10010] 
(
	[IDPeriodo] ASC,
	[IDEmpleado] ASC,
	[IDTipoIncidencia] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXPEREMPINCFEC] ON [dbo].[Nom10010] 
(
	[IDPeriodo] ASC,
	[IDEmpleado] ASC,
	[IDTipoIncidencia] ASC,
	[Fecha] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10015](
	[IDPoliza] [int] IDENTITY(1,1) NOT NULL,
	[IDPeriodo] [int] NULL,
	[EstadoContab] [varchar](1) NULL,
	[FechaPoliza] [datetime] NULL,
	[TipoPoliza] [int] NULL,
	[NumeroPoliza] [int] NULL,
	[Concepto] [varchar](100) NULL,
	[Diario] [smallint] NULL,
 CONSTRAINT [PK_nom10015] PRIMARY KEY CLUSTERED 
(
	[IDPoliza] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]


SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[NOM10014](
	[IDTControlVacaciones] [int] IDENTITY(1,1) NOT NULL,
	[IDEmpleado] [int] NULL,
	[Ejercicio] [int] NULL,
	[DiasVacaciones] [int] NULL,
	[DiasPrimaVacacional] [float] NULL,
	[FechaInicio] [datetime] NULL,
	[FechaFin] [datetime] NULL,
	[DiasDescanso] [varchar](100) NULL,
	[TimeStamp] [datetime] NULL,
	[FechaPago] [datetime] NULL,
 CONSTRAINT [PK_nom10014] PRIMARY KEY CLUSTERED 
(
	[IDTControlVacaciones] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXEJERCICIOEMPLEADO] ON [dbo].[NOM10014] 
(
	[Ejercicio] ASC,
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADO] ON [dbo].[NOM10014] 
(
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOFECHAINICIO] ON [dbo].[NOM10014] 
(
	[IDEmpleado] ASC,
	[FechaInicio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXFECHAINICIO] ON [dbo].[NOM10014] 
(
	[FechaInicio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10016](
	[IDMovtoPoliza] [int] IDENTITY(1,1) NOT NULL,
	[IDPoliza] [int] NULL,
	[CuentaCW] [varchar](31) NULL,
	[NumeroMovto] [int] NULL,
	[Referencia] [varchar](10) NULL,
	[Concepto] [varchar](30) NULL,
	[TipoMovto] [char](1) NULL,
	[Cargo] [float] NULL,
	[Abono] [float] NULL,
	[CargoMonedaExt] [float] NULL,
	[AbonoMonedaExt] [float] NULL,
	[Diario] [smallint] NULL,
	[csegmentonegocio] [int] NULL,
 CONSTRAINT [PK_nom10016] PRIMARY KEY CLUSTERED 
(
	[IDMovtoPoliza] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXPOLIZA] ON [dbo].[Nom10016] 
(
	[IDPoliza] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXPOLIZACUENTATIPO] ON [dbo].[Nom10016] 
(
	[IDPoliza] ASC,
	[CuentaCW] ASC,
	[TipoMovto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [IDXPOLIZAMOVTO] ON [dbo].[nom10016] 
(
	[idpoliza] ASC,
	[numeromovto] ASC	
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10017](
	[IDMovtoPermanente] [int] IDENTITY(1,1) NOT NULL,
	[IDEmpleado] [int] NULL,
	[IDConcepto] [int] NULL,
	[Descripcion] [varchar](40) NULL,
	[Tipo] [char](1) NULL,
	[Valor] [float] NULL,
	[VecesAplicar] [int] NULL,
	[VecesAplicado] [int] NULL,
	[MontoLimite] [float] NULL,
	[MontoAcumulado] [float] NULL,
	[MontoAcumuladoEjeAnt] [float] NULL,
	[FechaRegistro] [datetime] NULL,
	[NumeroControl] [varchar](40) NULL,
	[Estado] [bit] NOT NULL CONSTRAINT [DF_Nom10017_Estado]  DEFAULT ((0)),
	[TimeStamp] [datetime] NULL,
	[NumeroFiltro] [int] NULL,
	[FechaInicioTarjeta] [datetime] NULL,
 CONSTRAINT [PK_nom10017] PRIMARY KEY CLUSTERED 
(
	[IDMovtoPermanente] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXDESCRIPCION] ON [dbo].[Nom10017] 
(
	[Descripcion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADO] ON [dbo].[Nom10017] 
(
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADODESCRIPCION] ON [dbo].[Nom10017] 
(
	[IDEmpleado] ASC,
	[Descripcion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10018](
	[IDTarjetaIncapacidad] [int] IDENTITY(1,1) NOT NULL,
	[IDTipoIncidencia] [int] NULL,
	[IDEmpleado] [int] NULL,
	[Folio] [varchar](20) NULL,
	[DiasAutorizados] [int] NULL,
	[FechaInicio] [datetime] NULL,
	[Descripcion] [varchar](40) NULL,
	[IncapacidadInicial] [varchar](1) NULL,
	[RamoSeguro] [varchar](1) NULL,
	[TipoRiesgo] [varchar](1) NULL,
	[NumeroCaso] [int] NULL,
	[FinCaso] [bit] NOT NULL CONSTRAINT [DF_Nom10018_FinCaso]  DEFAULT ((0)),
	[PorcentajeIncapacidad] [float] NULL,
	[ControlMaternidad] [bit] NOT NULL CONSTRAINT [DF_Nom10018_ControlMaternidad]  DEFAULT ((0)),
	[NombreMedico] [varchar](40) NULL,
	[MatriculaMedico] [varchar](40) NULL,
	[Circunstancia] [varchar](1) NULL,
	[TimeStamp] [datetime] NULL,
	[ControlIncapacidad] [char](1) NULL,
	[SecuelaConsecuencia] [char](1) NULL,
 CONSTRAINT [PK_nom10018] PRIMARY KEY CLUSTERED 
(
	[IDTarjetaIncapacidad] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXEMPLEADO] ON [dbo].[Nom10018] 
(
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADOFOLIO] ON [dbo].[Nom10018] 
(
	[IDEmpleado] ASC,
	[Folio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXEMPLEADONUMEROCASO] ON [dbo].[Nom10018] 
(
	[IDEmpleado] ASC,
	[NumeroCaso] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXFOLIO] ON [dbo].[Nom10018] 
(
	[Folio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[NOM10022](
	[IDTipoIncidencia] [int] IDENTITY(1,1) NOT NULL,
	[Descripcion] [varchar](40) NULL,
	[Mnemonico] [varchar](4) NULL,
	[DerechoSueldo] [bit] NOT NULL CONSTRAINT [DF_NOM10022_DerechoSueldo]  DEFAULT ((0)),
	[PorcentajeSueldo] [float] NULL,
	[TipoIMSS] [varchar](1) NULL,
	[TipoIncidencia] [varchar](1) NULL,
	[DerechoSeptimoDia] [bit] NOT NULL CONSTRAINT [DF_NOM10022_DerechoSeptimoDia]  DEFAULT ((0)),
	[TimeStamp] [datetime] NULL,
	[ValorUnidad] [float] NULL,
 CONSTRAINT [PK_nom10022] PRIMARY KEY CLUSTERED 
(
	[IDTipoIncidencia] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXDESCRIPCION] ON [dbo].[NOM10022] 
(
	[Descripcion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXMNEMONICO] ON [dbo].[NOM10022] 
(
	[Mnemonico] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXTIPOINCIDENCIA] ON [dbo].[NOM10022] 
(
	[TipoIncidencia] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10024](
	[IDDispFiscal] [int] IDENTITY(1,1) NOT NULL,
	[Tipo] [varchar](1) NULL,
	[Descripcion] [varchar](40) NULL,
	[Ruta] [varchar](255) NULL,
	[FechaInicio] [varchar](5) NULL,
	[Frecuencia] [varchar](1) NULL,
	[Activada] [bit] NOT NULL CONSTRAINT [DF_Nom10024_Activada]  DEFAULT ((0)),
	[TimeStamp] [datetime] NULL,
 CONSTRAINT [PK_nom10024] PRIMARY KEY CLUSTERED 
(
	[IDDispFiscal] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXDESCRIPCION] ON [dbo].[Nom10024] 
(
	[Descripcion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXFECHAINICIO] ON [dbo].[Nom10024] 
(
	[FechaInicio] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXFFRECUENCIA] ON [dbo].[Nom10024] 
(
	[FechaInicio] ASC,
	[Frecuencia] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10027](
	[NumeroTabla] [int] IDENTITY(1,1) NOT NULL,
	[Descripcion] [varchar](40) NULL,
	[TimeStamp] [datetime] NULL,
 CONSTRAINT [PK_nom10027] PRIMARY KEY CLUSTERED 
(
	[NumeroTabla] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXDESCRIPCION] ON [dbo].[Nom10027] 
(
	[Descripcion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10030](
	[IDCategoria] [int] IDENTITY(1,1) NOT NULL,
	[Nombre] [varchar](40) NULL,
	[Grupo] [varchar](1) NULL,
	[Tipo] [varchar](1) NULL,
	[Posicion] [int] NULL,
	[TimeStamp] [datetime] NULL,
	[cPropia] [bit] NOT NULL,
 CONSTRAINT [PK_nom10030] PRIMARY KEY CLUSTERED 
(
	[IDCategoria] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXPOSICION] ON [dbo].[Nom10030] 
(
	[Posicion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10031](
	[IDFormula] [int] IDENTITY(1,1) NOT NULL,
	[IDCategoria] [int] NULL,
	[Nombre] [varchar](40) NULL,
	[Tipo] [varchar](1) NULL,
	[Posicion] [int] NULL,
	[Descripcion] [text] NULL,
	[Ayuda] [text] NULL,
	[Expresion] [text] NULL,
	[Modificado] [bit] NOT NULL CONSTRAINT [DF_Nom10031_Modificado]  DEFAULT ((0)),
	[TimeStamp] [datetime] NULL,
	[Version] [int] NULL,
 CONSTRAINT [PK_nom10031] PRIMARY KEY CLUSTERED 
(
	[IDFormula] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXCATEGORIAPOSICION] ON [dbo].[Nom10031] 
(
	[IDCategoria] ASC,
	[Posicion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXNOMBRE] ON [dbo].[Nom10031] 
(
	[Nombre] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXPOSICION] ON [dbo].[Nom10031] 
(
	[Posicion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10032](
	[IDTurno] [int] IDENTITY(1,1) NOT NULL,
	[NumeroTurno] [int] NULL,
	[Descripcion] [varchar](40) NULL,
	[NumeroHoras] [float] NULL,
	[TimeStamp] [datetime] NULL,
 CONSTRAINT [PK_nom10032] PRIMARY KEY CLUSTERED 
(
	[IDTurno] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXDESCRIPCION] ON [dbo].[Nom10032] 
(
	[Descripcion] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXNUMEROTURNO] ON [dbo].[Nom10032] 
(
	[NumeroTurno] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[NOM10033](
	[IDModelo] [int] IDENTITY(1,1) NOT NULL,
	[Archivo] [varchar](255) NULL,
	[Descripcion] [varchar](40) NULL,
 CONSTRAINT [PK_nom10033] PRIMARY KEY CLUSTERED 
(
	[IDModelo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]


SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10034](
	[IDEmpleado] [int] NOT NULL,
	[IDTipoPeriodo] [int] NOT NULL,
	[CIdPeriodo] [int] NOT NULL,
	[IDDepartamento] [int] NULL,
	[IDPuesto] [int] NULL,
	[IDTurno] [int] NULL,
	[EstadoCivil] [varchar](1) NULL,
	[UMF] [int] NULL,
	[CuentaPagoElectronico] [varchar](20) NULL,
	[SucursalPagoElectronico] [varchar](50) NULL,
	[BancoPagoElectronico] [int] NULL,
	[EstadoEmpleado] [varchar](1) NULL,
	[SueldoDiario] [float] NULL,
	[FechaSueldoDiario] [datetime] NULL,
	[SueldoVariable] [float] NULL,
	[FechaSueldoVariable] [datetime] NULL,
	[SueldoPromedio] [float] NULL,
	[FechaSueldoPromedio] [datetime] NULL,
	[SueldoIntegrado] [float] NULL,
	[FechaSueldoIntegrado] [datetime] NULL,
	[Calculado] [bit] NOT NULL CONSTRAINT [DF_Nom10034_Calculado]  DEFAULT ((0)),
	[Afectado] [bit] NOT NULL CONSTRAINT [DF_Nom10034_Afectado]  DEFAULT ((0)),
	[CalculadoExtraordinario] [bit] NOT NULL CONSTRAINT [DF_Nom10034_CalculadoExtraordinario]  DEFAULT ((0)),
	[AfectadoExtraordinario] [bit] NULL CONSTRAINT [DF_Nom10034_AfectadoExtraordinario]  DEFAULT ((0)),
	[InterfazCheqpaqW] [bit] NOT NULL CONSTRAINT [DF_Nom10034_InterfazCheqpaqW]  DEFAULT ((0)),
	[ModificacionNeto] [bit] NOT NULL CONSTRAINT [DF_Nom10034_ModificacionNeto]  DEFAULT ((0)),
	[FechaAlta] [datetime] NULL,
	[CuentaCW] [varchar](31) NULL,
	[TipoContrato] [varchar](1) NULL,
	[BaseCotizacionIMSS] [varchar](1) NULL,
	[TipoEmpleado] [varchar](1) NULL,
	[BasePago] [varchar](1) NULL,
	[FormaPago] [varchar](1) NULL,
	[ZonaSalario] [varchar](1) NULL,
	[ModificacionSalarioIMSS] [bit] NOT NULL CONSTRAINT [DF_Nom10034_ModificacionSalarioIMSS]  DEFAULT ((0)),
	[AltaIMSS] [bit] NOT NULL CONSTRAINT [DF_Nom10034_AltaIMSS]  DEFAULT ((0)),
	[BajaIMSS] [bit] NOT NULL CONSTRAINT [DF_Nom10034_BajaIMSS]  DEFAULT ((0)),
	[CambioCotizacionIMSS] [bit] NOT NULL CONSTRAINT [DF_Nom10034_CambioCotizacionIMSS]  DEFAULT ((0)),
	[Telefono] [varchar](20) NULL,
	[CodigoPostal] [int] NULL,
	[Direccion] [varchar](60) NULL,
	[Poblacion] [varchar](60) NULL,
	[Estado] [varchar](20) NULL,
	[NumeroAfore] [varchar](50) NULL,
	[FechaBaja] [datetime] NULL,
	[CausaBaja] [varchar](60) NULL,
	[SueldoBaseLiquidacion] [float] NULL,
	[CampoExtra1] [varchar](40) NULL,
	[CampoExtra2] [varchar](40) NULL,
	[CampoExtra3] [varchar](40) NULL,
	[FechaReingreso] [datetime] NULL,
	[AjusteAlNeto] [float] NULL,
	[TimeStamp] [datetime] NULL,
	[CIdRegistroPatronal] [int] NULL,
	[CEstadoEmpleadoPeriodo] [varchar](4) NULL,
	[CcampoExtraNumerico1] [float] NULL,
	[CCampoExtraNumerico2] [float] NULL,
	[CCampoExtraNumerico3] [float] NULL,
	[CCampoExtraNumerico4] [float] NULL,
	[CCampoExtraNumerico5] [float] NULL,
	[CDiasTrabajados] [float] NULL,
	[CDiasPagados] [float] NULL,
	[CDiasCotizados] [float] NULL,
	[CDiasAusencia] [float] NULL,
	[CDiasIncapacidades] [float] NULL,
	[CDiasVacaciones] [float] NULL,
	[CDiasPropSeptimos] [float] NULL,
	[CHorasExtras1] [float] NULL,
	[CHorasExtras2] [float] NULL,
	[CHorasExtras3] [float] NULL,
	[CFechaSueldoMixto] [datetime] NULL,
	[CSueldoMixto] [float] NULL,
	[CFechaCorte] [datetime] NULL,
 CONSTRAINT [PK_nom10034] PRIMARY KEY CLUSTERED 
(
	[IDEmpleado] ASC,
	[IDTipoPeriodo] ASC,
	[CIdPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXIDDEPTOEMPLEADOFECHA] ON [dbo].[Nom10034] 
(
	[IDDepartamento] ASC,
	[IDEmpleado] ASC,
	[CFechaCorte] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDEMPLEADOFECHA] ON [dbo].[Nom10034] 
(
	[IDEmpleado] ASC,
	[CFechaCorte] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDPERIODOEMPLEADO] ON [dbo].[Nom10034] 
(
	[CIdPeriodo] ASC,
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Nom10001](
	[IDEmpleado] [int] IDENTITY(1,1) NOT NULL,
	[IDDepartamento] [int] NULL,
	[IDPuesto] [int] NULL,
	[IDTipoPeriodo] [int] NULL,
	[IDTurno] [int] NULL,
	[CodigoEmpleado] [varchar](30) NULL,
	[Nombre] [varchar](40) NULL,
	[Fotografia] [image] NULL,
	[ApellidoPaterno] [varchar](40) NULL,
	[ApellidoMaterno] [varchar](40) NULL,
	[NombreLargo] [varchar](120) NULL,
	[FechaNacimiento] [datetime] NULL,
	[LugarNacimiento] [varchar](40) NULL,
	[EstadoCivil] [varchar](1) NULL,
	[Sexo] [varchar](1) NULL,
	[CURPI] [varchar](6) NULL,
	[CURPF] [varchar](8) NULL,
	[NumeroSeguroSocial] [varchar](11) NULL,
	[UMF] [int] NULL,
	[RFC] [varchar](4) NULL,
	[Homoclave] [varchar](4) NULL,
	[CuentaPagoElectronico] [varchar](20) NULL,
	[SucursalPagoElectronico] [varchar](50) NULL,
	[BancoPagoElectronico] [int] NULL,
	[EstadoEmpleado] [varchar](1) NULL,
	[SueldoDiario] [float] NULL,
	[FechaSueldoDiario] [datetime] NULL,
	[SueldoVariable] [float] NULL,
	[FechaSueldoVariable] [datetime] NULL,
	[SueldoPromedio] [float] NULL,
	[FechaSueldoPromedio] [datetime] NULL,
	[SueldoIntegrado] [float] NULL,
	[FechaSueldoIntegrado] [datetime] NULL,
	[Calculado] [bit] NOT NULL CONSTRAINT [DF_Nom10001_Calculado]  DEFAULT ((0)),
	[Afectado] [bit] NOT NULL CONSTRAINT [DF_Nom10001_Afectado]  DEFAULT ((0)),
	[CalculadoExtraordinario] [bit] NOT NULL CONSTRAINT [DF_Nom10001_CalculadoExtraordinario]  DEFAULT ((0)),
	[AfectadoExtraordinario] [bit] NULL CONSTRAINT [DF_Nom10001_AfectadoExtraordinario]  DEFAULT ((0)),
	[InterfazCheqpaqW] [bit] NOT NULL CONSTRAINT [DF_Nom10001_InterfazCheqpaqW]  DEFAULT ((0)),
	[ModificacionNeto] [bit] NOT NULL CONSTRAINT [DF_Nom10001_ModificacionNeto]  DEFAULT ((0)),
	[FechaAlta] [datetime] NULL,
	[CuentaCW] [varchar](31) NULL,
	[TipoContrato] [varchar](1) NULL,
	[BaseCotizacionIMSS] [varchar](1) NULL,
	[TipoEmpleado] [varchar](1) NULL,
	[BasePago] [varchar](1) NULL,
	[FormaPago] [varchar](1) NULL,
	[ZonaSalario] [varchar](1) NULL,
	[CalculoPTU] [bit] NOT NULL CONSTRAINT [DF_Nom10001_CalculoPTU]  DEFAULT ((0)),
	[CalculoAguinaldo] [bit] NOT NULL CONSTRAINT [DF_Nom10001_CalculoAguinaldo]  DEFAULT ((0)),
	[ModificacionSalarioIMSS] [bit] NOT NULL CONSTRAINT [DF_Nom10001_ModificacionSalarioIMSS]  DEFAULT ((0)),
	[AltaIMSS] [bit] NOT NULL CONSTRAINT [DF_Nom10001_AltaIMSS]  DEFAULT ((0)),
	[BajaIMSS] [bit] NOT NULL CONSTRAINT [DF_Nom10001_BajaIMSS]  DEFAULT ((0)),
	[CambioCotizacionIMSS] [bit] NOT NULL CONSTRAINT [DF_Nom10001_CambioCotizacionIMSS]  DEFAULT ((0)),
	[Expediente] [text] NULL,
	[Telefono] [varchar](20) NULL,
	[CodigoPostal] [int] NULL,
	[Direccion] [varchar](60) NULL,
	[Poblacion] [varchar](60) NULL,
	[Estado] [varchar](20) NULL,
	[NombrePadre] [varchar](60) NULL,
	[NombreMadre] [varchar](60) NULL,
	[NumeroAfore] [varchar](50) NULL,
	[FechaBaja] [datetime] NULL,
	[CausaBaja] [varchar](60) NULL,
	[SueldoBaseLiquidacion] [float] NULL,
	[CampoExtra1] [varchar](40) NULL,
	[CampoExtra2] [varchar](40) NULL,
	[CampoExtra3] [varchar](40) NULL,
	[FechaReingreso] [datetime] NULL,
	[AjusteAlNeto] [float] NULL,
	[TimeStamp] [datetime] NULL,
	[CIdRegistroPatronal] [int] NULL,
	[CCampoExtraNumerico1] [float] NULL,
	[CCampoExtraNumerico2] [float] NULL,
	[CCampoExtraNumerico3] [float] NULL,
	[CCampoExtraNumerico4] [float] NULL,
	[CCampoExtraNumerico5] [float] NULL,
	[CEstadoEmpleadoPeriodo] [varchar](4) NULL,
	[CFechaSueldoMixto] [datetime] NULL,
	[CSueldoMixto] [float] NULL,
 CONSTRAINT [PK_nom10001] PRIMARY KEY CLUSTERED 
(
	[IDEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE NONCLUSTERED INDEX [IDXCODIGOEMPLEADO] ON [dbo].[Nom10001] 
(
	[CodigoEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXDEPTOTIPOPER] ON [dbo].[Nom10001] 
(
	[IDDepartamento] ASC,
	[IDTipoPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDDEPTO] ON [dbo].[Nom10001] 
(
	[IDDepartamento] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDDEPTOCODIGO] ON [dbo].[Nom10001] 
(
	[IDDepartamento] ASC,
	[CodigoEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXIDEMPLEADOTIPOPERIODO] ON [dbo].[Nom10001] 
(
	[IDEmpleado] ASC,
	[IDTipoPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXNOMBRE] ON [dbo].[Nom10001] 
(
	[NombreLargo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXTIPOPERIODO] ON [dbo].[Nom10001] 
(
	[IDTipoPeriodo] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXTIPOPERIODOCODIGO] ON [dbo].[Nom10001] 
(
	[IDTipoPeriodo] ASC,
	[CodigoEmpleado] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IDXTIPOPERIODODEPTO] ON [dbo].[Nom10001] 
(
	[IDTipoPeriodo] ASC,
	[IDDepartamento] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
