What is the best way to set up a trigger to get all new rows in a table and insert them into a work queue table.
Many Thanks
Sp
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To answer the question you asked
However instead of actually duplicating the rows twice can you not use some other attribute of the rows to detect “New” ones that should be considered part of the worktable. Such as ID or adding an “inserted” date/time field.
Or another approach might be to just start afresh with the new WorkTable and consider all previous records to be archived. You can create a (possibly Partitioned) View
UNION ALL-ing the 2 tables for those queries that need to work on the consolidated set.