I have tbl_emp like that:
empid
1
2
3
4
And tbl_att like that:
empid workingdate
1 2017-05-11
2 2017-05-13
3 2017-05-14
...........
...........
I have a job in SQL Server agent to execute step every Sunday and I want that job to insert a row for each empid with that day into tbl_att. Let's say Sunday is 2017-05-22 so I want it like that:
empid workingdate
1 2017-05-22
2 2017-05-22
3 2017-05-22
It means that I want it to insert into tbl_att for all empid with the same day (task execution day), so can anyone guide me a query that I need to put into my step command?