Posted By

marvin9000 on 04/01/11


Tagged

Oracle


Versions (?)

Test String is numeric


 / Published in: SQL
 

  1. LENGTH(TRIM(TRANSLATE('123b', ' +-.0123456789',' '))); --would return 1
  2. LENGTH(TRIM(TRANSLATE('a123b', ' +-.0123456789',' '))); --would return 2
  3. LENGTH(TRIM(TRANSLATE('1256.54', ' +-.0123456789',' '))); --would return null
  4. LENGTH(TRIM(TRANSLATE ('-56', ' +-.0123456789',' '))); --would return null

Report this snippet  

You need to login to post a comment.