AppLib RAND

From Eigenpedia

(Redirected from LucidDbAppLib RAND)
Jump to: navigation, search

Contents

Syntax

   APPLIB.RAND ( minimum, maximum )

Purpose

Returns a random number. Return is an integer value.

Parameters

  • minimum: minimum value of the generated random number. [INTEGER]
  • maximum: maximum value of the generated random number. [INTEGER]

Output

  • [INTEGER] Random number between minimum and maximum values.
    • Throws an exception if minimum is not less than maximum and if either input is null

Example

VALUES( APPLIB.RAND(99, 1023) )

Value returned will be between 99 and 1023 inclusive.

Source Code

http://p4web.eigenbase.org/open/dev/luciddb/src/com/lucidera/luciddb/applib/numeric/RandUdf.java

Personal tools