Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Calculation and Comparison of values

Status
Not open for further replies.

juergenkemeter

Programmer
Oct 6, 2004
27
NZ
Hi,

I have a field „Actual_Stock”. A SQL-Query gets the actual Stock of the Substance (DECIMAL) and shows it in the field.
I also have a DATE – Field “RERETDAT”, where the User types in the Retest Date of the Substance.

Is it possible in SQL to make two ‘Alarm functions’, e.g. a pop-up window or a Field with the Text ‘OK’ / ‘alarm text’?

With the field “Actual_Stock”, the Alarm should be automatically engage with a shortfall of a certain boundary value of the Substance Quantity, e.g. 200.00 [milligram].
With the field “RERETDAT”, the Alarm should automatically engage e.g. two months before. This would be a sort of comparison function between the actual date and (RERETDAT minus “two Months”)?

Perhaps this is possible with a Trigger or starting a Java program or a Batch-file which starts a Pop-Up-Window with the alarm text in it.

Since my SQL knowledge is not sufficient for this problem, I am thankful for help.

Ciao
Jürgen Kemeter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top