IsUndefined
Function | IsUndefined | ||||||
---|---|---|---|---|---|---|---|
Action | Given a table as a parameter, this built-in function will output a table that indicates whether the input table is real and full of values or whether it is the result of an operation that produced nothing, which is different to producing an empty table. | ||||||
Parameters |
| ||||||
Return values | A table with a single row and a single column called
| ||||||
Example | An instruction that generates and tests for an undefined table. The reason it is undefined is because the body of the foreach is never executed. The script output is column Value with a cell containing the number one. @sequence = Utilities.GenerateSequence(Limit: 5); @emptyTable = SELECT * FROM @sequence WHERE Sequence = 1942; @undefinedTable = FOREACH @number IN @emptyTable DO SELECT * FROM @number WHERE Sequence > 3; DONE; @isUndefined = IsUndefined( Table : @undefinedTable ); SELECT * FROM @isUndefined; An instruction that generates and tests for an defined table. The script output is column Value with a cell containing the number zero. @sequence = Utilities.GenerateSequence(Limit: 5); @definedTable = FOREACH @number IN @sequence DO SELECT * FROM @number WHERE Sequence > 3; DONE; @isUndefined = IsUndefined( Table : @definedTable ); SELECT * FROM @isUndefined; | ||||||
Platforms |
| ||||||
Notes | Only works for @tables not $tables. |