10 15 4 AsValue

LANSA Technical

10.15.4 AsValue

AsValue allows you to better handle *SQLNull. Rather than having to test for a potential SQL null, AsValue allows a variable to return a specified value.

Input Parameters

Default - The value to be returned when the variable contains an SQLNull.

Allowable values for a date variable are any valid dates

Example

The IF below tests for the date as SQLnull or less than 10:

 

If ((#Number.IsSqlNull) *or (#Number < 10))

 

Endif

 

Using AsValue it can be coded as follows

 

If (#Number.AsValue(0) < 10)

 

 Endif

Ý 10.15 Floating Point Intrinsic Functions