Table of Contents
User Documentation
Ispirer Capabilities - Informix Migration
Pricing
Informix - String Functions
This article describes string functions in Infrormix.
Overview
| Function | Description |
|---|---|
| TRIM() | Removes leading and/or trailing pad characters from a string |
TRIM
| Informix - TRIM | |
|---|---|
| Syntax | TRIM([BOTH | LEADING | TRAILING [pad_character] FROM] string) |
| Description | Removes leading and/or trailing characters from a string LEADING, TRAILING or BOTH pad_character removed from string. |
| Default | pad_character is blank character (ASCII 32) Trim option is BOTH |
| Return Type | Returns NULL if pad_character or string is NULL. |
Example:
CREATE TABLE trim_tb (cname VARCHAR(30));
INSERT INTO trim_tb VALUES ('San Francisco* ');
SELECT TRIM(TRAILING '*' FROM cname) FROM trim_tb;
Result:
-------
San Francisco
Informix TRIM - Equivalents in Other Databases