Running script automatically when threshold limit met in one of the field in oracle database

Hi Guys,

Need you help in one point!

I am working on one shell script which takes following steps :

  1. Taking one query result from oracle database
  2. Exporting that result to Xls file
  3. Mailing that file to my own mail ID

Now, I want to give a threshold limit to one of the column in database, so that once it meets the threshold(Suppose number of user in the system is reached to 100) then it will automatically send me a mail of the result of query.

can anyone come up with command to use? So that i can search more option on it!

Thankuzz...!! :):slight_smile: