Use the # symbol instead of $ to refer to values from a field in the previous row. However, the function will return null when used on the first record since there is no record preceding the first record. The specification of each data type is shown in 4.3 below.
Data type |
Format |
Example |
Numeric( |
#{fieldname} |
#{amount}, #{stockprice} |
Character string( |
#s{fieldname} |
#s{gender}, #s{gender} |
Date( |
#d{fieldname} |
#d{date}, #d{releasedate} |
Time( |
#t{fieldname} |
#d{time}, #d{departuretime} |
Boolean( |
#b{fieldname} |
#b{condition}, #b{condition} |