IS_SPACES
Returns whether a string value consists entirely of spaces. A space is a blank space, a formfeed, a newline, a carriage return, a tab, or a vertical tab.
IS_SPACES evaluates an empty string as FALSE because there are no spaces. To test for an empty string, use LENGTH.
Syntax
IS_SPACES( value )
The following table describes the argument for this command:
Argument | Required/ Optional | Description |
---|
value | Required | Must be a string datatype. Passes the rows you want to evaluate. You can enter any valid transformation expression. |
Return Value
TRUE (1) if the row consists entirely of spaces.
FALSE (0) if the row contains data.
NULL if a value in the expression is NULL.
Example
The following expression checks the ITEM_NAME port for rows that consist entirely of spaces:
IS_SPACES( ITEM_NAME )
ITEM_NAME | RETURN VALUE |
---|
Flashlight | 0 (False) |
| 1 (True) |
Regulator system | 0 (False) |
NULL | NULL |
'' | 0 (FALSE) (Empty string does not contain spaces.) |
IIF( IS_SPACES( CUST_NAMES ), '00000', CUST_NAMES )