Validate String as Alphanumeric

Write a PLSQL function that accepts some text and validates that the text has only Alphanumeic characters and returns true else returns false

Showing Answers 1 - 1 of 1 Answers


  • Oct 25th, 2018

LENGTH(TRIM(TRANSLATE(string1, abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-.0123456789, )))
This function will return a null value if string1 is alphanumeric. It will return a value "greater than 0" if string1 contains any non-alphanumeric characters.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions