LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  SQL In Operator and Wildcard

    Employee
    Posted 05-04-2015 12:19

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: jpstory

    Hi,

    I have the following function to work as the In Operator in SQL
    GoodRecord = False
    
    If FiledA.regexIsMatch("^(ValueA|ValueB|ValueC)$") Then GoodRecord = True
    Is there anyway to get it work on wildcard? Meaning instead of giving specific condition values for ValueA, ValueB and ValueC, Can I have *ValueA* ?


  • 2.  RE: SQL In Operator and Wildcard

    Employee
    Posted 05-05-2015 06:13

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: lnason

    Can you give some literal examples of values that you will be processing that would pass/match the regex as well as some examples that you will be processing that you want to not match the regex?


  • 3.  RE: SQL In Operator and Wildcard

    Employee
    Posted 05-05-2015 12:54

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: jpstory

    Hi Inason

    Thanks for looking at this, the field I am trying to look at contains values in format of ABCD-00001234, 00003567, 9987 and A2D4H88EYS8 (the length varies).


  • 4.  RE: SQL In Operator and Wildcard

    Employee
    Posted 05-06-2015 07:54

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: lnason

    I'm still not sure I understand exactly what you are trying to implement. Having said that, based on the sample values you provided you could do the following to flag values with the string "0000"....

    GoodRecord = False

    if 'DATA'.regexIsMatch("0000") then {GoodRecord = True}

    .....but you could also just use the "strFind" function as follows:

    GoodRecord = False

    if ('DATA'.strFind("0000") > -1) then {GoodRecord = True}


  • 5.  RE: SQL In Operator and Wildcard

    Employee
    Posted 05-06-2015 09:56

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: jpstory

    Thanks for the help!