Base De Datos Nomina.docx

  • Uploaded by: Bernardino Martinez
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Base De Datos Nomina.docx as PDF for free.

More details

  • Words: 276
  • Pages: 2
CREATE DATABASE tijuana USE tijuana CREATE TABLE empleado( id_emp int primary key, nombre char(30), apaellido_p char(20), apellido_m char(20), fecha_ingreso date, RFC char(10), NSS int, depto char(20) ) CREATE TABLE percepciones( id_percepciones int primary key, id_emp int foreign key references empleado(id_emp), sueldo_hr money, hrs_trabajadas money, septimo_dia money, bono_puntualidad money, transporte money, ) --Datos en tabla empleado INSERT INTO empleado VALUES (1,'Bernardino','Martinez','Jeronimo','02/11/2015','MAID',123456,'SISTEMAS') INSERT INTO empleado VALUES (2,'Esteban','Bengamin','Acosta','05/12/2016','LOBJ',132456,'SISTEMAS') INSERT INTO empleado VALUES (3,'Jose','Lopez','Perez','02/02/2017','ORTM',142356,'SISTEMAS') INSERT INTO empleado VALUES (4,'Deyanira','Coronado','Felipe','11/03/2017','COFD',214563,'SISTEMAS') INSERT INTO empleado VALUES (5,'Sandra','Jimenez','Flores','01/05/2017','WUFT',521463,'SISTEMAS') SELECT * FROM empleado --Datos en tabla percepciones INSERT INTO percepciones VALUES (10,1,81,48,20,200,100) INSERT INTO percepciones VALUES (11,2,79,48,20,200,100) INSERT INTO percepciones VALUES (12,3,85,48,20,200,100) INSERT INTO percepciones VALUES (13,4,80,48,20,0,100) INSERT INTO percepciones VALUES (14,5,81,48,20,200,100) SELECT * FROM percepciones CREATE TABLE deducciones( id_deducciones int primary key, id_emp int foreign key references empleado(id_emp), subsidio_empleo money, IMSS money, deduccion_comida money, ajuste_diferencia money, ) CREATE TABLE nomina( folio_nomina int primary key, nombre_empresa char(50), direccion char(50), RFC char(18), registro_Patronal_IMSS CHAR(20), nomina_semana int, inicio_semana date, termino_semana date, id_emp int foreign key references empleado(id_emp),

id_percepciones int foreign key references percepciones(id_percepciones), id_deducciones int foreign key references deducciones(id_deducciones), total_percepciones money, total_deducciones money, total_a_pagar money ) --Datos en tabla deducciones INSERT INTO deducciones VALUES (101,1,30,15.85,95,0.70) INSERT INTO deducciones VALUES (102,2,30,15.85,95,0.70) INSERT INTO deducciones VALUES (103,3,30,15.85,95,0.70) INSERT INTO deducciones VALUES (104,4,30,15.85,95,0.70) INSERT INTO deducciones VALUES (105,5,30,15.85,95,0.70) SELECT * FROM deducciones --Datos en tabla nomina INSERT INTO nomina VALUES(1001,'ITT','Calzada Tecnologico','ITT7DD','TT25A0',20,'02/10/2018','02/17/2018',1,10,101,8000,200.25,799 9.75) INSERT INTO nomina VALUES(1002,'ITT','Calzada Tecnologico','ITT7DD','TT25A0',20,'02/10/2018','02/17/2018',2,11,102,8000,200.25,799 9.75) INSERT INTO nomina VALUES(1003,'ITT','Calzada Tecnologico','ITT7DD','TT25A0',20,'02/10/2018','02/17/2018',3,12,103,8000,200.25,799 9.75) INSERT INTO nomina VALUES(1004,'ITT','Calzada Tecnologico','ITT7DD','TT25A0',20,'02/10/2018','02/17/2018',4,13,104,8000,200.25,799 9.75) INSERT INTO nomina VALUES(1005,'ITT','Calzada Tecnologico','ITT7DD','TT25A0',00,'02/10/2018','02/17/2018',5,14,105,8000,200.25,799 9.75) SELECT * FROM nomina SELECT * FROM Servername\SQLEXPRESS.databasename.dbo.tablename SELECT * FROM [P3IIG106-2\SQLSERVER2008R2].TEST_1.DBO.IMPRESIONES SELECT * FROM [PC-PC].monterrey.dbo.nomina SELECT * FROM nomina SELECT * FROM [PC-PC].culiacan.dbo.nomina

Related Documents

Base De Datos
April 2020 5
Base De Datos
October 2019 21
Taller Base De Datos
December 2019 47
Base De Datos
December 2019 10

More Documents from ""