开发者

APPEND SELECTED RECORDS TO TABLE

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜