Friday, July 20, 2012

SAS strip vs Oracle trim functions



SAS Strip and Oracle trim functions are equivalent. Both  can remove all leading and trailing blanks.  With Oracle trim, one can also define specific characters to be removed.



Oracle trim examples.

trim ('  hello ') returns 'hello'
trim (both '0' from '0012130')  returns 1213

SAS Strip remove leading and trailing blanks.

No comments: