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
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