SELECT user_id
FROM
USER_DUMPS
WHERE USER_ID like 'AB%'
I need to trim the whitespace from the right side of the USER_DUMPS table results. Results have 3 whitespaces.
SELECT user_id
FROM
USER_DUMPS
WHERE USER_ID like 'AB%'
I need to trim the whitespace from the right side of the USER_DUMPS table results. Results have 3 whitespaces.
You could use TRIM
:
SELECT TRIM(TRAILING FROM user_id) AS user_id
FROM USER_DUMPS
WHERE USER_ID like 'AB%'
You might use
( no need to use any argument, since the RTRIM(string)
function removes all trailing spaces from string if no argument specified. ) :
SELECT RTRIM(user_id) as "Trimmed Text"
FROM
USER_DUMPS
WHERE USER_ID like 'AB%';