justuptime.com - monitor your servers & websites

SQL Server - Stored Procedure

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

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.