Keeping Track of Data on a Report

In VFP I run a SELECT on Orders....

Then another SELECT * FROM cQuery WHERE cQuery.Order NOT IN (SELECT SentOrders.Order FROM SentOrders.DBF) into Cursor cNewRA

IF Count > 0
Select SentOrders
Append from dbf(cNewRA)

I run this every hour and with the hits I get I comare to the DBF from the last hour and if any new ones I can Email that out with the new orders
nothing happens until the next hour it runs

My question is how do I code this in SQL Server r2 so it can have a Table to store SentOrders and I can compare the new SELCT to it every hour and if there is new records send in EMAIL and update the SentOrders Table

Who is Participating?
jaymz69Author Commented:
Looks like what I need.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.