PFB Script
use PERDB (Only used for Spooling existing record reports )
Create Table Employee_details_test1 (employee_id varchar(100),Name varchar(100),Designation_code varchar(200))
insert into Employee_details_test1 values ('B0001','Ramesh.S','J0002'),
('B0002','Sures.m','J0001'),('B0003','Ram.G','J0002'),('B0004','Biju','J0005')
use HrmsDB (Live Which used by end users )
Create Table Employee_details_test (employee_id varchar(100),Name varchar(100),Designation_code varchar(200))
insert into Employee_details_test1 values ('B0001','Ramesh.G','J0004'),
('B0002','Sures.m','J0001'),('B0003','Ram.G','J0002'),('B0004','Biju','J0005'),('B0004','Biju','J0005'),('B0006','Raju ','J006')
Scenario
Create a scheduler every 15 min to do modification (UPDATE)of name and designation against employeecode in PERDB..Employee_details_test1 comparing source table Hrmsdb..Employee_details_test
If HRMSD associate B0001 was Ramesh.G the same should be updated in Perdb table.