500: waitingCount number := 0;
501:
502: begin
503:
504: SELECT count(*) into processedCount FROM wf_notifications
505: WHERE mail_status = 'SENT' AND status = 'OPEN';
506:
507: SELECT count(*) into waitingCount FROM wf_notifications
508: WHERE mail_status = 'MAIL';
503:
504: SELECT count(*) into processedCount FROM wf_notifications
505: WHERE mail_status = 'SENT' AND status = 'OPEN';
506:
507: SELECT count(*) into waitingCount FROM wf_notifications
508: WHERE mail_status = 'MAIL';
509:
510: UPDATE FND_USER_PREFERENCES
511: SET preference_value = to_char(processedCount)