Returns a character string with specified characters removed from the original string.
Category: | Character |
Returned data type: | CHAR, NCHAR |
specifies any valid expression that evaluates to a character expression and from which specified characters will be removed.
Requirement | Enclose a literal string of characters in single quotation marks. |
Data type | CHAR, NCHAR |
See | <sql-expression> |
FedSQL Expressions |
Number of Arguments
|
Results
|
---|---|
Only the first argument, source
|
All blanks have been
removed. If the argument is completely blank, then the result is a
string with a length of zero. If you assign the result to a character
variable with a fixed length, then the value of that variable will
be padded with blanks to fill its defined length.
|
Two arguments, source and chars
|
All characters that
appear in the second argument are removed from the result.
|
COMPRESS(source, "1234567890+-");
Statements
|
Results
|
---|---|
----+----1----+----2----+----3 |
|
select compress('abc','a'); |
bc |