Skip to main content

Extracting Records that end in 999

Hi There
I have a database that contains a series of Account Balances. I need to extract all those records / transactions that end in 999 or .99.
Any ideas?
Thank you
Regards
Aveen

Brian Element Fri, 12/05/2014 - 07:05

Hi Aveen,

I would turn the field into a character field and then use the @right function to do the extract.  Here is an example:

@right(@Str(FIELD, 10, 2), 6) = "999.00" .OR. @right(@Str(FIELD, 10, 2), 2) = "99"

It assumes that the field has two decimal place.

Norbert_L Fri, 12/05/2014 - 17:42

Hi Aveen, 
you could try the following at least for 999: @abs(@int(FIELD))%1000=999
Sadly it works only for searching amounts without looking at the decimal place. 
 
For example:
@abs(@int(1299.88))%100 returns 99.00
@abs(@int(1299.88))%1000 returns 299.00
@abs(@int(1299.88))%1000 returns 1299.00

aveenm293 Tue, 12/09/2014 - 00:30

Hi There
Thank you very much.
Regards
Aveen