Run SQL Server 2005 query every night?

Discussion in 'Databases' started by kadesmith, Sep 12, 2008.

  1. #1
    I need to run a certain query every night on a database and am wondering what the best practice for doing so. I am pretty new to SQL Server, but am wondering if this would be best as a stored procedure, trigger or just what? Please help.

    The basics of the query are as follows:

    INSERT INTO Table 1 (value1, value2) SELECT value1, value2 FROM TABLE 2
     
    kadesmith, Sep 12, 2008 IP
  2. mickster

    mickster Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Set up a stored procedure to run your statements and schedule it to run in SQL Server Agent every night.
     
    mickster, Jan 13, 2011 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Suspect they got an answer elsewhere or gave up in the last 2 years
     
    AstarothSolutions, Jan 16, 2011 IP