4.6 Value from Previous Row

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.

Table 4.3: Specification of retrieving values from previous row

Data type

Format

Example

Numeric($num$)

#{fieldname}

#{amount}, #{stockprice}

Character string($str$)

#s{fieldname}

#s{gender}, #s{gender}

Date($date$)

#d{fieldname}

#d{date}, #d{releasedate}

Time($time$)

#t{fieldname}

#d{time}, #d{departuretime}

Boolean($bool$)

#b{fieldname}

#b{condition}, #b{condition}