This is a 2 step process. First setup a deferred report, to run ALL statements nightly, or as needed, and spool this to a file. The statement deferred report will recalc and update the current, over 30, over 60, over 90 buckets in the ARCUSFIL_SQL.
Then use the following code:
Code:
update ARCUSFIL_SQL
set stm_freq = 'D'
where amt_age_prd_2+amt_age_prd_3+amt_age_prd_4 >10
The above code assumes no statements to anyone unless that have at least 10 bucks past due. Change this according to what figure you desire.
To get this code to run, open up Enterprise Manager and go to server, Management, SQL Server Agent, Jobs. Right click and select new job. Name it go to tab 2 steps, hit the new step button, and paste the code above in there. Make sure you are in the correct database. Go to tab 3 schedules to schedule it. It is pretty straight forward.
Let me know if you have any questions.
Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports