Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007

    Unanswered: SQL 2000 - Stored Procedure or DTS Package?

    I need to automate the following function. I know I can do this in .NET but I need to have a DTS package setup so it executes every evening.

    I have a view that produces a list of sales errors. I want to grab the SaleID from each record and insert a record into a "Current Queue" table.

    Here is another example of what I'm trying to do...

    SELECT SaleID FROM vw_SalesErrors

    - with the results of the SQL statement above

    INSERT INTO tbl_QueueRecords
    (SaleID, QueueID)
    (@SaleID, 14)

    I'm assuming there is a way to automate this into a single stored procedure or at least a DTS pacakge.

    Thanks for all of your help.

  2. #2
    Join Date
    May 2004
    you could put your query into an agent job. that's typically what's used in sql server for scheduling tasks.

    and for your query, I think you want this:

    INSERT INTO tbl_QueueRecords (SaleID, QueueID)
    SELECT SaleID, 14 FROM vw_SalesErrors

  3. #3
    Join Date
    Jan 2007


    Thank you very much. The insert statement you listed is exactly what I needed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts