SQL date control

Nuno Morgado 41 Reputation points
2022-07-11T16:36:19.267+00:00

Hi everybody.
I needed your help on the following question:
It is necessary to insert into a table a set of records obtained from other tables.
My difficulty is that this operation has to be performed on the 10th of each month.

What's the best solution?

Thank You.

Azure SQL Database
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,690 questions
{count} votes

Accepted answer
  1. LiHong-MSFT 10,051 Reputation points
    2022-07-12T02:31:06.17+00:00

    Hi @NunoMorgado-3416
    You could use SQL Server Service Broker to achieve scheduling.
    Refer to this article for more details: Scheduling Jobs in SQL Server Express

    Best regards,
    LiHong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Naomi Nosonovsky 8,146 Reputation points
    2022-07-11T17:10:10.653+00:00

    For on prem you can setup a SQL Server Agent job and run it on 10th of the month


  2. Dillon Silzer 57,631 Reputation points
    2022-07-11T17:36:29.633+00:00

    Please use the following documentation to schedule a job:

    https://www.mssqltips.com/sqlservertip/5830/how-to-schedule-sql-scripts-on-sql-server-express-edition/

    -----------------------

    If this helps please feel free to mark as answer.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.