I have a table with a column with big strings. I want to search through these strings and see if there are 4 consecutive upper case characters. Is there a way of doing this? I’m not too experienced in the substring methods of SQL.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looking for 4 chars inside a string is a classic LIKE in most SQL dialects.
To force upper case, you need to coerce the collation too with the COLLATE clause. The “CS” makes your column case sensitive
Edit: for any 4 upper case characters
Edit: with Latin1_General_BIN