Excerpt |
---|
Generates a random integer between a low and a high number. Two inputs may be Integer or Decimal types, functions returning these types, or column references. |
- Range is inclusive of the two parameter values.
- The first parameter must be the lower value in the range.
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: randbetween(1,10) as:'r10' |
---|
|
randbetween(1,10) |
Output: Generates a random Integer value between 1 and 10
.
D lang syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value: RANDBETWEEN(value1,value2) as:'random' |
---|
|
RANDBETWEEN(value1,value2) |
Argument | Required? | Data Type | Description |
---|
value1 | Y | Integer or Decimal | Integer or Decimal literal, function returning one of these data types, or a column reference for the lower boundary of the range. Range is inclusive of this value. |
value2 | Y | Integer or Decimal | Integer or Decimal literal, function returning one of these data types, or a column reference for the upper boundary of the range. Range is inclusive of this value. |
value1, value2
Literals, functions, or column references to Integer or Decimal values that are used as the lower and upper bounds, respectively, for the range.
- Missing input values generate missing results.
- Multiple columns and wildcards are not supported.
Usage Notes:
| | |
---|
Yes | Integer or Decimal literal, function, or column reference | 100 |
Example - RANDBETWEEN, PI, and TRUNC functions
Include Page |
---|
| EXAMPLE - RANDBETWEEN and PI Functions |
---|
| EXAMPLE - RANDBETWEEN and PI Functions |
---|
|