2

I would like a way to validate a string, it needs to have only letters and uppercase; but I could not find a way to do that.

1
  • 2
    Use a regex to validate it Commented Sep 27, 2017 at 14:53

1 Answer 1

2

Check for all records where the value 'record' matches only upper or lowercase letters from a-z

SELECT value FROM values WHERE value ~ '[A-Za-z]';
Sign up to request clarification or add additional context in comments.

4 Comments

Perfect, this solves my problem, but I need it to be just the lyrics; special characters like 'ÉÈÇÊ' and so on can not be in my string
does [a-zA-Z] return values containing 'ÉÈÇÊ' ?
shall not contain such characters; once inside the string has one of these; I need a false return.
Only accept the space character and the following characters in parentheses: (ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 ª º - /.,).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.