Posted By

mprabhuram on 06/21/10


Tagged

Oracle loannumberconversion


Versions (?)

Regular expression to convert alphanumeric field into numeric field


 / Published in: SQL
 

This will take the alpha numeric loan number field and converts it into numeric loan number. If there are any loan numbers with alphabet then it is converted as NULL (basically alpha numeric loan numbers are ignored)

  1. CASE
  2. WHEN REGEXP_LIKE(MASTER.LOANNO,'[^[:digit:]]') THEN NULL
  3. ELSE
  4. TO_NUMBER(MASTER.LOANNO)
  5. END AS ACCT_NBR,

Report this snippet  

You need to login to post a comment.