SQL Server - Stored Procedure

They have: 330 posts

Joined: Apr 2000

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)
VALUES
(@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.

They have: 330 posts

Joined: Apr 2000

Thank you for the response. I decided to setup a stored procedure and setup a job to execute the stored procedure once a day.

Thank you again for your help.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.