Skip to Content
0
Sep 20, 2014 at 03:38 PM

Alert based on a value of previous row

12 Views

Hello there

On a db level there are analytical functions 'LOG' which allows to compare the previous value, but my task is to create the alerter which sends e-mail if next value is greater than current one.

I know that there is a functions previous() etc, but how to implement this, maybe smb can elighten me on this.

Example:

ID DATE TRANSACTION COUNT

1 01.01.2014 1120

2 02.01.2014 1099

3 03.01.2014 1700 --> Alert is triggered

SO, for the last value alert has to be triggered and sent to E-mail. On DB level i see no problems implementing this, but how to implement this in Crystal?