0
DELIMITER $$

DROP PROCEDURE IF EXISTS `hrprocess_temp`.`sp_alltabinsert1` $$
CREATE DEFINER=`invensis`@`%` PROCEDURE `sp_alltabinsert1`(empid varchar(10),fname varchar(45),lname varchar(45),
fathername varchar(30),dob varchar(20),gender varchar(6),maritalstatus varchar(9),spousename varchar(15),children varchar(8),
commadd varchar(250),permadd varchar(250),mobileno varchar(15),landlineno varchar(15),email varchar(40),
languages varchar(25),nationality varchar(25),bloodgroup varchar(5),drivingno varchar(20),panno varchar(15),
passportno varchar(15),imagepath varchar(100),resumepath varchar(1000),skill varchar(250),deptname varchar(30),
Course varchar(20),Specialize varchar(35),institute varchar(25),PassYear varchar(10),
Organization varchar(25),Designation varchar(25),FromDt varchar(15),ToDt varchar(15),ReasonsChange varchar(100))
begin
declare empno int;
insert into Employee   (Emp_Id,First_Name,Last_name,Father_Name,Date_Birth,Gender,Marital_Status,Spouse_Name,
Children_No,Comm_Add,Perm_Add,Mobile_No,Land_No,Email_id,Language,Nationality,Blood_Group,Passport_No,
Pan_No,Driving_No,Image,Resume,skills ,Dept_Name)
                                      values (empid,fname,lname,fathername,dob,gender,maritalstatus,spousename,children,commadd,
                                       permadd,mobileno,landlineno,email,languages,nationality,bloodgroup,drivingno,panno,passportno,
                                        imagepath,resumepath,skill,deptname);

set@empno= last insert Emp_No();

 insert into Education ( Course, Specialize,institute,Pass_year,Emp_No)
                     values(course,specialize,institute,passyear,@empno);

insert into Experience (Organization,Designation,From_Dt,To_Dt,Reasons_Change,Emp_No)
                     values (Organization,Designation,FromDt,ToDt,ReasonsChange,@empno);
end $$

DELIMITER ;

Edited by peter_budo: Keep It Clear - Do wrap your programming code blocks within [code] ... [/code] tags

4
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by peter_budo
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.