Skip to Content
avatar image
Former Member

Check for UPPERCASE

I have a field that I want to check for UPPERCASE.

Is there a way to do that? 

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 18, 2014 at 10:15 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 18, 2014 at 09:03 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.