I want to use MS SQL Transact-SQL to schedule to run a script C:\script\my_script.sql
at 6 pm every day, except Saturday and Sunday.
Then, the result is saved in the folder C:\data\xxx.csv
where xxx
is the date of running the script, e.g. 2019-2-18
.
Here I want to schedule a script (or auto backup a table) which get complete data from a sql table and store it in another table with that day date as database name, which can be use to see records of data on any day.
Furthermore, how to delete the schedule task?
I used server agent but I cannot view the text.
Thank you very much.