AS400 SQL: TRIM
TRIM Sample Query and Result:
TRIM – Removed Both leading and Trailing
Blanks
select Length(trim(' 12345 ')) from Sysibm/Sysdummy1-> 5
LTRIM – Removes Leading blanks
select Length(ltrim(' 12345 ')) from Sysibm/Sysdummy1 -> 7
RTRIM – Removes Trailing blanks
select Length(rtrim(' 12345 ')) from Sysibm/Sysdummy1 -> 6
Comments
Post a Comment