on 09-18-2014 9:51 PM
I have a field that I want to check for UPPERCASE.
Is there a way to do that?
You can use regular expression.
The following code snippet will fail the records if the input value has any lower case letter
BEGIN RETURN
match_regex($param, '[^a-z]+', null);
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrew Olson,
You can do it by using match_pattern function in where clause and check for [A-Z] pattern. Hope this helps.
Regards,
Ansari MS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I am on the right path but still getting 0 for this decode statement and where I have two records as a test one being Field Opperator and the other being FIELD OPPERATOR. I would expect the first one to be 0 and the second one to be 1 but both are returning as 0 Do I have something wrong
DECODE( match_pattern(HR_Data_Source.dbo.HRP1000.STEXT, '[A-Z]') = TRUE,1,0)
I also tried this variation of above
DECODE( match_pattern(HR_Data_Source.dbo.HRP1000.STEXT, 'A-Z') = TRUE,1,0)
with same results. If I remove the ' ' around it i get an error.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.