1. Force the test string to upper-case.
2. Iterate thru string.
3. Check for chars with ascii char codes between
48-57 (for numbers) AND 65-90 (for chars).
3. Any char outside the realm of #2, above, fails.
Would you like a code example??? You can make it a
public function, stored in the database, and re-use it
whenever you like. It'd probably be between 10-20 lines.
Here's your code....Note that NULLs return a boolean success (true).
If you don't like it, the code can be altered as you need.
CREATE OR REPLACE FUNCTION alphaNumOnly(vString IN VARCHAR2) RETURN BOOLEAN IS
vCount NUMBER := 1;
IF vString IS NOT NULL THEN
FOR i IN 1..LENGTH(vString) LOOP
vChar := UPPER(SUBSTR(vString,vCount,1));
IF NOT(ASCII(vChar) BETWEEN 48 AND 57 OR ASCII(vChar) BETWEEN 65 AND 90) THEN
vCount := vCount+1;