Rakesh Kaushik

Rakesh Kaushik

  • 1.9k
  • 56
  • 30k

compare two tables and insert the record

Mar 14 2013 1:46 AM
Hello Guys,
I have two tables First One is.
tblSalaryMaster(salaryID,salaryName)
records are 1 Basic, 2 HRA, 3 Ca
and 2nd is tblSalaryDetailMaster(companyID,employeeID,salaryID,salaryAmount)
records are
1 1 1 10000
1 1 2 4000
1 1 3 3000
1 2 1 15000
1 2 2 7000
1 2 3 2000
and so on
now i add one more record to First Table 4 Allowance
as i am updating the second table now i want to compare first table values
with second table and if second table don't have the record(salaryID) then insert the record into
second table.
Please help me.





Answers (2)