SQLserver database contain two T开发者_JAVA技巧ables EmpList and SalarySheet now I want to transfer selected records into SalarySheet Table from EmpList Table Filter by "Onduty".
I'm using VB2010 Windows Form.
Some information about the layout of the tables involved would be a big help, but I'll take a very general stab at it.
Assuming that EmpList and SalarySheet have identical table structures the following might work:
INSERT INTO SalarySheet
SELECT * FROM EmpList
WHERE Status = "Onduty"
I'm just guessing that the filtering field is "Status" - you'll probably need to change this to use the correct field. And this may not work at all if the fields in SalarySheet and EmpList don't match exactly.
Good luck.
精彩评论