USE [marmotech] GO /****** Object: Table [dbo].[adtb00001] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00001]( [departamento] [smallint] NULL, [nom_dpto] [char](30) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [smalldatetime] NULL, [tipo_departamento] [nchar](20) NULL, [departamento_out] [int] NULL, [app_movil] [nchar](10) NULL, [num_emp_supervisa] [smallint] NULL, [grupo] [varchar](50) NULL, [coordinadora] [varchar](100) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00008] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00008]( [num_nomi] [int] NULL, [tipo_emp] [char](1) NULL, [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [fecha] [datetime] NULL, [cod_mov] [smallint] NULL, [cantidad] [decimal](10, 2) NULL, [valor] [decimal](10, 2) NULL, [clase_mov] [char](1) NULL, [status_t] [char](1) NULL, [us_crea] [varchar](50) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [varchar](50) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00002] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00002]( [cod_mov] [smallint] NULL, [descrip_mov] [char](30) NULL, [primer_enc] [char](8) NULL, [segundo_enc] [char](8) NULL, [tercer_enc] [char](8) NULL, [ch_encabeza] [char](10) NULL, [tipo_mov] [char](1) NULL, [clase_mov] [char](1) NULL, [afecta_tss] [nchar](10) NULL, [cantidad_cia] [decimal](10, 2) NULL, [cantidad_emp] [decimal](10, 2) NULL, [cta_control] [char](8) NULL, [cta_aux] [char](8) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL, [modifica] [nchar](2) NULL, [vacaciones] [nchar](10) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00010] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00010]( [tipo_emp] [char](1) NOT NULL, [h_normal] [decimal](8, 2) NULL, [num_nomi] [int] NOT NULL, [mes] [smallint] NULL, [ano] [smallint] NOT NULL, [num_sem] [smallint] NULL, [fecha_del] [date] NULL, [fecha_al] [date] NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL, [fecha_cierre_nomina] [date] NULL, [estado_legal] [nchar](50) NULL, [monto] [decimal](12, 2) NULL, CONSTRAINT [PK_notb00010] PRIMARY KEY CLUSTERED ( [tipo_emp] ASC, [num_nomi] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00004] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00004]( [cod_puesto] [smallint] NULL, [nom_puesto] [char](180) NULL, [otra_descripcion] [nchar](180) NULL, [funciones] [char](60) NULL, [funcion1] [char](60) NULL, [nivel_sal] [smallint] NULL, [salario_min] [decimal](10, 2) NULL, [salario_max] [decimal](10, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL, [tipo_puesto] [varchar](50) NULL, [supervisor] [nchar](10) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00003] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00003]( [num_emp] [smallint] NOT NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [nom1_emp] [char](15) NULL, [nom2_emp] [char](15) NULL, [apell1_emp] [char](15) NULL, [apell2_emp] [char](15) NULL, [tipo_empleado] [char](20) NULL, [fecha_termino_c] [date] NULL, [calle] [char](50) NULL, [casa_num] [char](10) NULL, [barrio] [char](50) NULL, [urbanizacion] [char](50) NULL, [credito] [nchar](10) NULL, [telefono] [char](15) NULL, [fech_nac] [date] NULL, [cod_nac] [smallint] NULL, [estado_civil] [char](1) NULL, [tipo_sangre] [char](3) NULL, [cedula] [char](11) NULL, [serie] [smallint] NULL, [licencia] [char](9) NULL, [sueldo_ac] [decimal](10, 2) NULL, [nomina] [char](1) NULL, [fech_efec] [date] NULL, [fecha_salida] [date] NULL, [paga_seg] [char](1) NULL, [cod_seg1] [char](11) NULL, [cod_seg2] [smallint] NULL, [cod_seg3] [smallint] NULL, [tipocuenta] [nchar](1) NULL, [cuenta_no] [varchar](25) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL, [foto_empleado] [varbinary](max) NULL, [sucid] [smallint] NULL, [monto_seg_med] [decimal](18, 0) NULL, [monto_seg_int] [decimal](18, 0) NULL, [monto_care] [decimal](18, 0) NULL, [fecha_ultimo_aumento] [date] NULL, [moneda] [nchar](3) NULL, [codbancodestino] [nchar](8) NULL, [digiverbancodestino] [nchar](1) NULL, [tipo_sueldo] [char](20) NULL, [email] [varchar](100) NULL, [instalador] [nchar](10) NULL, [cuenta_aux] [varchar](100) NULL, [cuenta_out] [int] NULL, [departamento_out] [int] NULL, [num_emp_supervisor] [int] NULL, [fecha_suspension] [date] NULL, [codigo_retiro_bco] [int] NULL, [genera_file_bco] [nchar](2) NULL, [fecha_valido_retiro] [date] NULL, [monto_retiro] [decimal](18, 2) NULL, [retiro_comercial] [nchar](10) NULL, [estado_legal] [nchar](20) NULL, [observacion] [varchar](255) NULL, [tipo_documento] [nchar](50) NULL, [gerentemarcas] [nchar](10) NULL, [alias] [varchar](100) NULL, [url_foto] [varchar](255) NULL, CONSTRAINT [PK_adtb00003_1] PRIMARY KEY CLUSTERED ( [num_emp] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO /****** Object: View [dbo].[empleados] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [dbo].[empleados] AS SELECT CAST(x0.departamento AS CHAR(4)) + '-' + x6.nom_dpto AS departamento, x0.nomina AS tipo_empleado, x0.num_emp AS ficha, ISNULL(RTRIM(x0.nom1_emp), ' ') + ' ' + ISNULL(RTRIM(x0.apell1_emp), ' ') AS nombre, x0.cedula, CAST(x0.cod_puesto AS char(4)) + '-' + x2.nom_puesto AS puesto, x0.fech_nac AS fecha_nacimiento, DATEPART(month, x0.fech_nac) AS mes_nacimiento, x0.fech_efec AS fecha_entrada, x1.fecha AS fecha_nomina, x3.ano, x4.descrip AS mes, DATEDIFF(day, x0.fech_efec, GETDATE()) / 365 AS tiempo_empresa, DATEPART(month, GETDATE()) - DATEPART(month, x0.fech_efec) AS meses, CAST(x5.cod_mov AS CHAR(2)) + '-' + x5.descrip_mov AS movimiento_nom, x0.sueldo_ac AS sueldo_actual, x1.valor AS valor_nomina, x0.status_t AS estado, x1.num_nomi AS nomina, x0.fecha_salida AS fehasalida, x1.clase_mov AS clasemovimiento, x0.cuenta_no AS cuenta, dbo.Sucursales.SucNombre AS LOCALIDAD, x0.urbanizacion AS PROVINCIA, x1.cantidad AS cantidad_nom, x5.cta_control, x5.cta_aux, x4.mes AS numero_mes, CASE x1.clase_mov WHEN 'D' THEN 'DESCUENTOS' WHEN 'I' THEN 'INGRESOS' WHEN 'E' THEN 'INGRESOS' END AS estado_mov, x0.retiro_comercial, x0.observacion, x0.estado_legal, x0.tipo_documento, x0.monto_retiro, x0.fecha_valido_retiro, x0.genera_file_bco FROM dbo.adtb00003 AS x0 INNER JOIN dbo.notb00008 AS x1 ON x0.num_emp = x1.num_emp INNER JOIN dbo.adtb00004 AS x2 ON x1.cod_puesto = x2.cod_puesto INNER JOIN dbo.adtb00001 AS x6 ON x1.departamento = x6.departamento INNER JOIN dbo.notb00010 AS x3 ON x1.fecha >= x3.fecha_del AND x1.fecha <= x3.fecha_al AND x1.num_nomi = x3.num_nomi AND x1.tipo_emp = x3.tipo_emp INNER JOIN dbo.mestable AS x4 ON x3.mes = x4.mes INNER JOIN dbo.notb00002 AS x5 ON x1.cod_mov = x5.cod_mov LEFT OUTER JOIN dbo.Sucursales ON x0.sucid = dbo.Sucursales.SucID AND x1.valor <> 0 WHERE (x1.fecha > '01/01/2021') GO /****** Object: Table [dbo].[adtb00002] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00002]( [cod_seccion] [nvarchar](2) NULL, [departamento] [smallint] NULL, [nom_seccion] [nvarchar](30) NULL, [status_t] [nvarchar](1) NULL, [us_crea] [nvarchar](9) NULL, [fech_crea] [datetime] NULL, [us_mod] [nvarchar](9) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00005] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00005]( [cod_educa] [smallint] NULL, [nom_educa] [char](30) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00006] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00006]( [cod_pericia] [smallint] NULL, [nom_pericia] [char](30) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00007] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00007]( [cod_nac] [smallint] NULL, [nom_nac] [char](30) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00008] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00008]( [cod_requi] [smallint] NULL, [requisito] [char](30) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00009] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00009]( [cod_mto] [smallint] NULL, [desc_mto] [char](50) NULL, [tipo_mov] [nchar](25) NULL, [cod_mov] [smallint] NULL, [cod_mov2] [smallint] NULL, [cod_mov3] [smallint] NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00010] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00010]( [cod_prof] [smallint] NULL, [nom_prof] [char](30) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00011] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00011]( [num_doc] [smallint] NULL, [fecha] [date] NULL, [fech_req] [date] NULL, [depart] [smallint] NULL, [tipo_req] [smallint] NULL, [razon_vac] [char](30) NULL, [cod_puesto_r] [smallint] NULL, [edad_min] [smallint] NULL, [salario_sem] [decimal](10, 2) NULL, [salario_men] [decimal](10, 2) NULL, [experiencia] [smallint] NULL, [cod_educa] [smallint] NULL, [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [num1_emp] [smallint] NULL, [departamento1] [smallint] NULL, [nivel1_emp] [smallint] NULL, [cod1_puesto] [smallint] NULL, [num2_emp] [smallint] NULL, [departamento2] [smallint] NULL, [nivel2_emp] [smallint] NULL, [cod2_puesto] [smallint] NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00012] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00012]( [cod_sol] [smallint] NULL, [fecha] [date] NULL, [nom1_sol] [char](15) NULL, [nom2_sol] [char](15) NULL, [apell1_sol] [char](15) NULL, [apell2_sol] [char](15) NULL, [calle] [char](50) NULL, [casa_num] [char](10) NULL, [barrio] [char](30) NULL, [urbanizacion] [char](30) NULL, [telefono] [char](15) NULL, [cod_provincia] [smallint] NULL, [fech_nac] [date] NULL, [cod_nac] [smallint] NULL, [estado_civil] [char](1) NULL, [estatura] [char](4) NULL, [peso] [smallint] NULL, [tipo_documento] [nchar](20) NULL, [cedula] [nchar](11) NOT NULL, [serie] [smallint] NULL, [licencia] [char](11) NULL, [tipo_sangre] [char](3) NULL, [cod_puesto] [smallint] NULL, [cod_prof] [smallint] NULL, [sexo] [char](1) NULL, [afp] [nchar](80) NULL, [ars] [nchar](80) NULL, [numero_nss] [nchar](50) NULL, [seguro_complementario] [nchar](25) NULL, [categoria_licencia_conducir] [nchar](10) NULL, [sueldo_deseado] [decimal](12, 2) NULL, [pariente_emergencia] [nchar](60) NULL, [parentesco_emergencia] [nchar](60) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL, [familiar_emp] [nchar](10) NULL, [familiar_parentesco] [nchar](50) NULL, [vehiculo_propio] [nchar](2) NULL, [tipo_vivienda] [varchar](50) NULL, [email] [varchar](100) NULL, [cuenta_bancaria] [varchar](50) NULL, [banco] [varchar](100) NULL, [arrestado] [nchar](10) NULL, [motivo_arresto] [varchar](100) NULL, [sometido_justicia] [varchar](100) NULL, [motivo_sometido_justicia] [varchar](100) NULL, [foto_solicitante] [varbinary](max) NULL, [celular] [varchar](15) NULL, [no_afiliacion] [varchar](25) NULL, [telefono_contacto_emergencia] [varchar](15) NULL, CONSTRAINT [PK_adtb00012] PRIMARY KEY CLUSTERED ( [cedula] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00013] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00013]( [cod_sol] [smallint] NULL, [cod_par] [smallint] NULL, [sec_par] [smallint] NULL, [nombre] [char](100) NULL, [cedula] [char](20) NULL, [sexo] [char](1) NULL, [telefono] [varchar](20) NULL, [fecha_nac] [date] NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL, [edad] [smallint] NULL, [ocupacion] [varchar](100) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00014] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00014]( [secuencia] [int] NOT NULL, [cod_sol] [smallint] NULL, [nom_ref] [char](100) NULL, [anos_rel] [smallint] NULL, [telefono] [char](20) NULL, [calle] [char](100) NULL, [casa_num] [char](10) NULL, [parentesco] [char](30) NULL, [urbanizacion] [char](100) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00015] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00015]( [cod_sol] [smallint] NULL, [nom_inst] [varchar](100) NULL, [calle] [varchar](100) NULL, [urbanizacion] [varchar](100) NULL, [puesto] [varchar](100) NULL, [fecha_inicio] [date] NULL, [fecha_termino] [date] NULL, [observacion] [varchar](100) NULL, [sueldo] [decimal](18, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL, [telefono] [varchar](20) NULL, [email] [varchar](100) NULL, [url] [varchar](100) NULL, [contacto] [varchar](100) NULL, [puesto_contacto] [varchar](100) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00016] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00016]( [cod_sol] [smallint] NULL, [nom_empr] [char](30) NULL, [calle] [char](30) NULL, [casa_num] [char](10) NULL, [barrio] [char](20) NULL, [urbanizacion] [char](20) NULL, [cod_puesto] [smallint] NULL, [sueldo] [decimal](10, 2) NULL, [ano_ini] [smallint] NULL, [ano_fin] [smallint] NULL, [desc_retiro] [char](60) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00017] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00017]( [num_trx] [int] NULL, [cod_sol] [smallint] NULL, [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [fech_efec] [datetime] NULL, [salario] [decimal](10, 2) NULL, [cod_mto] [smallint] NULL, [sec_mto] [smallint] NULL, [nivel_sal] [smallint] NULL, [liquidacion] [decimal](10, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](30) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](30) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00018] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00018]( [fecha] [date] NULL, [cod_sol] [smallint] NULL, [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [num3_emp] [smallint] NULL, [departamento3] [smallint] NULL, [nivel3_emp] [smallint] NULL, [cod3_puesto] [smallint] NULL, [recomendacion] [smallint] NULL, [otros_com] [char](60) NULL, [num1_emp] [smallint] NULL, [departamento1] [smallint] NULL, [nivel1_emp] [smallint] NULL, [cod1_puesto] [smallint] NULL, [num2_emp] [smallint] NULL, [departamento2] [smallint] NULL, [nivel2_emp] [smallint] NULL, [cod2_puesto] [smallint] NULL, [cod_requi] [smallint] NULL, [ind_requi] [char](1) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00019] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00019]( [cod_sol] [smallint] NULL, [fech_efec] [date] NULL, [sueldo] [decimal](10, 2) NULL, [cod_mto] [smallint] NULL, [sec_mto] [smallint] NULL, [periodo] [smallint] NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00020] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00020]( [num_trx] [int] NULL, [cod_sol] [int] NULL, [fecha] [date] NULL, [fech_efec] [date] NULL, [num_emp] [int] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [sueldo_ac] [decimal](10, 2) NULL, [nomina] [char](20) NULL, [estado_civil] [char](1) NULL, [tipo_sangre] [char](3) NULL, [cod_mto] [smallint] NULL, [observacion] [char](60) NULL, [num1_emp] [smallint] NULL, [departamento1] [smallint] NULL, [nivel1_emp] [smallint] NULL, [cod1_puesto] [smallint] NULL, [num2_emp] [smallint] NULL, [departamento2] [smallint] NULL, [nivel2_emp] [smallint] NULL, [cod2_puesto] [smallint] NULL, [num3_emp] [smallint] NULL, [departamento3] [smallint] NULL, [nivel3_emp] [smallint] NULL, [cod3_puesto] [smallint] NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL, [sueldo_lq] [decimal](18, 2) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00021] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00021]( [num_emp] [smallint] NOT NULL, [cod_par] [smallint] NULL, [sec_par] [smallint] NULL, [nombre] [char](80) NULL, [cedula] [char](20) NULL, [sexo] [char](1) NULL, [fecha_nac] [date] NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [smalldatetime] NULL, CONSTRAINT [PK_adtb00021] PRIMARY KEY CLUSTERED ( [num_emp] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00022] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00022]( [fecha] [date] NULL, [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [cod_prof] [smallint] NULL, [evento] [smallint] NULL, [nom_evento] [char](80) NULL, [fech_evento] [date] NULL, [costo_evento] [decimal](10, 2) NULL, [num1_emp] [smallint] NULL, [departamento1] [smallint] NULL, [nivel1_emp] [smallint] NULL, [cod1_puesto] [smallint] NULL, [num2_emp] [smallint] NULL, [departamento2] [smallint] NULL, [nivel2_emp] [smallint] NULL, [cod2_puesto] [smallint] NULL, [num3_emp] [smallint] NULL, [departamento3] [smallint] NULL, [nivel3_emp] [smallint] NULL, [cod3_puesto] [smallint] NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00023] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00023]( [fecha] [date] NULL, [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [hora_ent] [datetime] NULL, [hora_sal] [datetime] NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00024] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00024]( [nivel_emp] [smallint] NULL, [desc_nivel] [char](30) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00025] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00025]( [cod_par] [smallint] NULL, [desc_par] [char](11) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00026] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00026]( [amon_num] [smallint] NULL, [fecha] [date] NULL, [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [violacion] [char](60) NULL, [violacion1] [char](60) NULL, [num1_emp] [smallint] NULL, [departamento1] [smallint] NULL, [nivel1_emp] [smallint] NULL, [cod1_puesto] [smallint] NULL, [num2_emp] [smallint] NULL, [departamento2] [smallint] NULL, [nivel2_emp] [smallint] NULL, [cod2_puesto] [smallint] NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00027] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00027]( [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [fecha_sal] [date] NULL, [fecha_ent] [date] NULL, [dias_tomados] [int] NULL, [dias_vac] [int] NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00028] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00028]( [num_trx] [int] NOT NULL, [clave] [char](2) NOT NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL, CONSTRAINT [PK_adtb00028] PRIMARY KEY CLUSTERED ( [num_trx] ASC, [clave] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00029] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00029]( [departamento] [smallint] NULL, [estado_a] [char](4) NULL, [estado_m] [char](4) NULL, [depto_ant] [smallint] NULL, [estatus_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [smalldatetime] NULL, [cuenta_no] [varchar](10) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00030] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00030]( [num_emp] [smallint] NULL, [sexo] [char](1) NULL, [nis] [nchar](25) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00031] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00031]( [num_doc] [int] NOT NULL, [cod_pericia] [smallint] NOT NULL, [status_per] [nchar](10) NOT NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00032] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00032]( [num_trx] [int] NULL, [num_emp] [int] NULL, [cod_mov] [smallint] NULL, [cod_mov2] [smallint] NULL, [fecha] [date] NULL, [num_dia] [decimal](18, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL, [fecha_sal] [date] NULL, [fecha_ent] [date] NULL, [num_nomi] [int] NULL, [num_dias_pagados] [smallint] NULL, [num_nomi_no] [smallint] NULL, [num_dias_disfrute] [decimal](12, 2) NULL, [periodo] [smallint] NULL, [valor_vacaciones] [decimal](12, 2) NULL, [proporcion_vacaciones] [decimal](18, 2) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00033] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00033]( [dpto] [char](1) NULL, [departamento] [smallint] NULL, [nom_dpto] [char](30) NULL, [status_t] [char](1) NULL, [us_crea] [char](30) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](30) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00034] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00034]( [id] [int] IDENTITY(1,1) NOT NULL, [departamento] [int] NOT NULL, [departamento_relaciona] [int] NOT NULL, [us_crea] [varchar](50) NOT NULL, [fech_crea] [datetime] NOT NULL, [us_mod] [varchar](50) NULL, [fech_mod] [datetime] NULL, CONSTRAINT [PK_adtb00034] PRIMARY KEY CLUSTERED ( [id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00036] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00036]( [num_emp] [smallint] NULL, [nom1_emp] [char](20) NULL, [nom2_emp] [char](20) NULL, [apell1_emp] [char](20) NULL, [apell2_emp] [char](20) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00038] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00038]( [num_emp] [smallint] NULL, [cedula_n] [char](13) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00040] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00040]( [cod_plan] [smallint] NULL, [plan_descrip] [char](40) NULL, [porc_vida] [decimal](8, 4) NULL, [porc_mid] [decimal](8, 4) NULL, [porc_comision] [decimal](8, 4) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00041] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00041]( [mes] [smallint] NULL, [ano] [smallint] NULL, [num_sem] [smallint] NULL, [fecha_del] [date] NULL, [fecha_al] [date] NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00042] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00042]( [dep_corp] [smallint] NULL, [nombre_depto] [char](50) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00043] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00043]( [cod_sol] [int] NULL, [idioma] [nchar](30) NULL, [habla] [nchar](4) NULL, [lee] [nchar](4) NULL, [escribe] [nchar](4) NULL, [status_t] [nchar](1) NULL, [us_crea] [nchar](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [nchar](50) NULL, [fech_mod] [datetime] NULL, [id] [smallint] NULL, [otros_idioma] [varchar](30) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00045] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00045]( [cod_idioma] [smallint] NULL, [idioma] [nchar](30) NULL, [pais] [nchar](50) NULL, [region] [nchar](50) NULL, [continente] [nchar](50) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00046] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00046]( [cod_sol] [int] NULL, [enfermedad] [nchar](50) NULL, [padecimiento] [nchar](50) NULL, [observacion] [nchar](60) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00047] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00047]( [cod_sol] [int] NOT NULL, [nombre_institucion] [varchar](100) NULL, [calle] [varchar](100) NULL, [casa_num] [varchar](10) NULL, [urbanizacion] [varchar](100) NULL, [cod_educa] [smallint] NULL, [duracion] [smallint] NULL, [ano_termino] [smallint] NULL, [descripcion_curso] [varchar](100) NULL, [modalidad] [varchar](50) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00048] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00048]( [secuencia] [int] NULL, [us_crea] [varchar](50) NULL, [fech_crea] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00049] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00049]( [cod_sol] [int] NULL, [id] [int] NULL, [nombre_file] [varchar](100) NULL, [binario] [varbinary](max) NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00050] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00050]( [cod_sol] [int] NOT NULL, [id] [int] IDENTITY(1,1) NOT NULL, [herramienta] [varchar](50) NULL, [nivel] [varchar](50) NULL, [tiempo_experiencia] [varchar](50) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00051] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00051]( [departamento] [smallint] NULL, [mision] [varchar](100) NULL, [vision] [varchar](100) NULL, [valores] [varchar](100) NULL, [us_crea] [varchar](50) NULL, [fech_crea] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00052] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00052]( [departamento] [smallint] NULL, [fortalezas] [varchar](100) NULL, [id_fortalezas] [int] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00053] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00053]( [doc_id] [int] NOT NULL, [fech_aut] [datetime] NULL, [ficha_empleado] [nvarchar](50) NULL, [nombre_empleado] [nvarchar](50) NULL, [departamento] [nvarchar](50) NULL, [supervisor] [nvarchar](50) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00054] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00054]( [id_hora] [int] IDENTITY(1,1) NOT NULL, [descripcion] [varchar](50) NULL, [tol_entrada] [time](7) NULL, [entrada] [time](7) NULL, [tol_salida] [time](7) NULL, [salida] [time](7) NULL, CONSTRAINT [PK_adtb00054] PRIMARY KEY CLUSTERED ( [id_hora] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00055] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00055]( [departamento] [smallint] NOT NULL, [num_emp] [smallint] NOT NULL, [id_horario] [int] NOT NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [status_t] [char](1) NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[adtb00056] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[adtb00056]( [num_emp] [int] NULL, [nombreEmp] [varchar](100) NULL, [departamento_visualiza] [int] NOT NULL, [us_crea] [varchar](50) NULL, [fech_crea] [datetime] NULL, [usuario] [varchar](50) NOT NULL, CONSTRAINT [PK_adtb00056] PRIMARY KEY CLUSTERED ( [departamento_visualiza] ASC, [usuario] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00001] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00001]( [ult_cheque] [int] NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00003] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00003]( [num_emp] [smallint] NOT NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [cod_mov] [smallint] NOT NULL, [cantidad] [decimal](10, 2) NULL, [valor] [decimal](10, 2) NULL, [status_t] [char](1) NULL, [us_crea] [varchar](50) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [varchar](50) NULL, [fech_mod] [smalldatetime] NULL, CONSTRAINT [PK_notb00003] PRIMARY KEY CLUSTERED ( [num_emp] ASC, [cod_mov] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00005] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00005]( [salario] [decimal](12, 2) NULL, [valor] [decimal](12, 2) NULL, [porc_imp] [decimal](8, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00006] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00006]( [salario_sem_desde] [decimal](10, 2) NULL, [salario_sem_hasta] [decimal](10, 2) NULL, [salario_men_desde] [decimal](10, 2) NULL, [salario_men_hasta] [decimal](10, 2) NULL, [porc_emp] [decimal](10, 2) NULL, [porc_pat] [decimal](10, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00007] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00007]( [num_nomi] [smallint] NULL, [tipo_emp] [char](1) NULL, [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [cod_mov] [smallint] NULL, [cantidad] [decimal](10, 2) NULL, [valor] [decimal](10, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](50) NULL, [fech_crea] [datetime] NULL, [us_mod] [char](50) NULL, [fech_mod] [datetime] NULL, [num_trx] [int] NULL, [cod_mto] [smallint] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00009] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00009]( [num_nomi] [int] NULL, [tipo_emp] [char](1) NULL, [cheque_no] [smallint] NULL, [num_emp] [smallint] NULL, [monto] [decimal](10, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00011] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00011]( [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [num_doc] [int] NULL, [cod_mov] [smallint] NULL, [fecha] [date] NULL, [monto] [decimal](10, 2) NULL, [porciento] [decimal](5, 2) NULL, [status_t] [char](1) NULL, [us_crea] [varchar](50) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [varchar](50) NULL, [fech_mod] [smalldatetime] NULL, [valor_cuota] [decimal](12, 2) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00012] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00012]( [cod_mes] [smallint] NULL, [dias] [smallint] NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00013] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00013]( [cod_mov] [smallint] NULL, [cod_mov_a] [smallint] NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00014] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00014]( [cod_mov] [smallint] NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00015] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00015]( [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [num_doc] [int] NULL, [cod_mov] [smallint] NULL, [fecha] [datetime] NULL, [monto] [decimal](10, 2) NULL, [porciento] [decimal](5, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00016] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00016]( [num_nomi] [int] NULL, [tipo_emp] [char](1) NULL, [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [nivel_emp] [smallint] NULL, [cod_puesto] [smallint] NULL, [fecha] [datetime] NULL, [cod_mov] [smallint] NULL, [cantidad] [decimal](10, 2) NULL, [valor] [decimal](10, 2) NULL, [clase_mov] [char](1) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00017] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00017]( [num_emp] [smallint] NULL, [departamento] [smallint] NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00018] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00018]( [num_emp] [smallint] NULL, [porc_accidente] [decimal](12, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00019] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00019]( [num_nomi] [smallint] NULL, [tipo_emp] [char](1) NULL, [cheque_no_ini] [int] NULL, [cheque_no_fin] [int] NULL, [cuenta_no] [char](8) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00020] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00020]( [cuenta_no] [char](8) NULL, [cheque_no] [int] NULL, [num_emp] [smallint] NULL, [fecha] [datetime] NULL, [portador] [char](30) NULL, [tasa] [decimal](8, 2) NULL, [monto] [decimal](12, 2) NULL, [status_impresion] [char](1) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00021] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00021]( [num_nomi] [smallint] NULL, [tipo_emp] [char](1) NULL, [cheque_no_ini] [int] NULL, [cheque_no_fin] [int] NULL, [cuenta_no] [char](8) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00023] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00023]( [numero_nomina] [smallint] NULL, [tipo_emp] [char](1) NULL, [fecha] [date] NULL, [monto_excento] [decimal](12, 2) NULL, [porc_15] [decimal](12, 2) NULL, [porc_20] [decimal](12, 2) NULL, [porc_25] [decimal](12, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fecha_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fecha_mod] [smalldatetime] NULL, [monto_ars] [decimal](12, 2) NULL, [monto_afp] [decimal](12, 2) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00028] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00028]( [num_doc] [int] IDENTITY(1,1) NOT NULL, [supervisor] [varchar](50) NULL, [num_emp] [int] NOT NULL, [fecha] [date] NULL, [us_crea] [varchar](50) NULL, [us_mod] [varchar](50) NULL, [fech_mod] [datetime] NULL, [fech_crea] [datetime] NULL, [pagado] [char](2) NULL, [comentario] [varchar](100) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00029] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00029]( [num_doc] [int] NOT NULL, [num_emp] [int] NOT NULL, [nombre] [varchar](50) NULL, [fecha] [datetime] NULL, [fec_mod] [datetime] NULL, [us_mod] [varchar](50) NULL, [sueldo] [varchar](50) NULL, [cantidad] [int] NOT NULL, [valor] [varchar](100) NULL, [descrip_mov] [decimal](12, 2) NULL, [cod_mov] [smallint] NOT NULL, [us_crea] [varchar](50) NULL, [fech_crea] [datetime] NULL, [departamento] [int] NULL, [departamento_labor] [int] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00033] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00033]( [num_nomi] [smallint] NULL, [departamento] [smallint] NULL, [cod_puesto] [smallint] NULL, [fecha_liquidacion] [datetime] NULL, [num_emp] [smallint] NULL, [sueldo_actual] [decimal](12, 2) NULL, [sueldo_promedio] [decimal](12, 2) NULL, [salario_dia] [decimal](12, 2) NULL, [anos_empresa] [smallint] NULL, [meses_empresa] [smallint] NULL, [dias_empresa] [smallint] NULL, [dias_cesantia] [smallint] NULL, [dias_preaviso] [smallint] NULL, [dias_vacaciones] [smallint] NULL, [ultimas_vacaciones] [datetime] NULL, [tiempo_empresa] [decimal](6, 2) NULL, [status_t] [char](1) NULL, [us_crea] [char](9) NULL, [fech_crea] [smalldatetime] NULL, [us_mod] [char](9) NULL, [fech_mod] [smalldatetime] NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[notb00050] Script Date: 2/8/2023 2:22:49 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[notb00050]( [cedula] [nchar](16) NOT NULL, [num_emp] [int] NOT NULL, [fecha] [date] NOT NULL, [codigo] [varchar](10) NOT NULL, [fecha_generacion] [date] NOT NULL, [num_nomi] [int] NOT NULL, [tipo_emp] [nchar](10) NULL, CONSTRAINT [PK_notb00050] PRIMARY KEY CLUSTERED ( [cedula] ASC, [codigo] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00] Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4 Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1 [50] 4 [25] 3))" End Begin PaneConfiguration = 2 NumPanes = 3 Configuration = "(H (1 [50] 2 [25] 3))" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1 [75] 4))" End Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End ActivePaneConfig = 0 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "x0" Begin Extent = Top = 6 Left = 38 Bottom = 136 Right = 249 End DisplayFlags = 280 TopColumn = 54 End Begin Table = "x1" Begin Extent = Top = 6 Left = 287 Bottom = 136 Right = 457 End DisplayFlags = 280 TopColumn = 8 End Begin Table = "x2" Begin Extent = Top = 138 Left = 38 Bottom = 268 Right = 214 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "x6" Begin Extent = Top = 138 Left = 252 Bottom = 268 Right = 442 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "x3" Begin Extent = Top = 270 Left = 38 Bottom = 400 Right = 236 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "x4" Begin Extent = Top = 270 Left = 274 Bottom = 400 Right = 444 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "x5" Begin Extent = Top = 402 Left = 38 Bottom = 532 Right = 208 End DisplayFlags = 280 TopColumn = 0 ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'empleados' GO EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N' End Begin Table = "Sucursales" Begin Extent = Top = 402 Left = 246 Bottom = 532 Right = 419 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = Begin ParameterDefaults = "" End End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 1776 Table = 1176 Output = 720 Append = 1400 NewValue = 1170 SortType = 1356 SortOrder = 1416 GroupBy = 1350 Filter = 1356 Or = 1350 Or = 1350 Or = 1350 End End End ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'empleados' GO EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'empleados' GO