Extracting Records that end in 999

4 posts / 0 new
Last post
aveenm293
Offline
Joined: 10/23/2012 - 16:02
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's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

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's picture
Norbert_L
Offline
Joined: 09/03/2014 - 10:37

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
Offline
Joined: 10/23/2012 - 16:02

Hi There
Thank you very much.
Regards
Aveen