Sok Dymang
asked on
Automatically add row to table by job in SqlServer 2012
Dear all brother and sister, i am working on VB.Net and SqlServer application, let say i have table "tbl_att" with field (empid, WorkingDate) and i want Sql job to do a task for me. I want it automatically insert 1 row for 1 user every Sunday (I have more than 100 empID) like:
empid WorkingDate
1 2017-05-02
2 2017-05-02
3 2017-05-02
So is this operation need loop? as in attached picture
Thanks in advance.
ew.PNG
empid WorkingDate
1 2017-05-02
2 2017-05-02
3 2017-05-02
So is this operation need loop? as in attached picture
Thanks in advance.
ew.PNG
you can first creating a Stored Procedure that includes the logic of adding the records and then create an automated process (such as SQL Job, or a custom ETL program that running on a specific date time) to run that Stored Procedure to create the relevant records into your table.
hope that make sense.
hope that make sense.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
and somehow create a job and run this sp...