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

Popular posts from this blog

AS400 : Add a new line in text in email SNDSMTPEMM

AS400 Display: Radio Button (SNGCHCFLD)

AS400 Display File: Check Box (MLTCHCFLD)