Hi,
I'm working on a project where I have a SQL DB for a Work Order system. I've created a custom table that holds data for open work orders. I've scheduled a "Job" using the SQL server agent that runs a Insert (where not exist) statement every 5 minutes. It works fine to insert new work orders into the table. The problem I have is how to get ride of the work orders once they are completed.
Do I need to use 2 different SQL statements in my SQL Job (maybe a second step) to cleanup all closed work orders? Am I on the right track using 2 SQL statements to insert new work orders and cleanup closed work orders?
Thanks!