I just want to use both JOBS, Alerts and SQL Mail to make brilliant solutions as follows:
1) the manager should be alerted with the new requisitions from his employee every day.
2) I think of the a job that select count of requisitions where the requisition date is (getdate()-1).
3) if the count of requisitions is >0 this send email to the manager.
I succeeded to send email whenever the job sucess, but my problem is the statments is always evaluated to success as soon as it returns any value.
How to make the job fails if the count of requisitions is zero ?
I can accept any other solutions that can apply this Idea.
Many thanks.
1) the manager should be alerted with the new requisitions from his employee every day.
2) I think of the a job that select count of requisitions where the requisition date is (getdate()-1).
3) if the count of requisitions is >0 this send email to the manager.
I succeeded to send email whenever the job sucess, but my problem is the statments is always evaluated to success as soon as it returns any value.
How to make the job fails if the count of requisitions is zero ?
I can accept any other solutions that can apply this Idea.
Many thanks.