Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LTRIM RTRIM usage in Informix

Status
Not open for further replies.

rmutyapu

IS-IT--Management
Nov 2, 2001
24
US
I am new to this LTRIM and RTRIM usage in Informix. I would like to know the usage of LTRIM and RTRIM in informix 9.4

Thanks for your help.
 
It will remove the blank spaces from left / right sides of the selected field, hope so..try
 
There is no command LTRIM or RTRIM in Informix 9.4

The correct syntax is :

TRIM(TRAILING " " from somevar)
or just TRIM(somevar) -> RTRIM
TRIM(LEADING " " from somevar) -> LTRIM

instead of " " you can remove any other char

TRIM(LEADING "#" from somevar) would return

"123" if somevar was "###123"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top