Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need no find a function to find the strings "AA12" and "BB12" in the middle of a large string.
And count how many AA12 and BB12 where found in a list of strings
example:
ASDRF-FRRTT-AA12-DSDSFDF006-
ASEERF-FQSETT-AA12-DSDSFDF009-
ASMAT1-FRRTT-BB12-DSDSFGF0008-
thanks
Create a field in the script that gets the value 1 if there's a match:
LOAD
MyString,
if(wildmatch(MyString, '*AA12*','*BB12*'),1,0) as Flag
FROM ...somewhere...;
Then you can use an expression sum(Flag) in a textbox or chart to count these cases
If you just want to count how often AA12 occurs in MyString you can use substringcount(MyString,'AA12')
Create a field in the script that gets the value 1 if there's a match:
LOAD
MyString,
if(wildmatch(MyString, '*AA12*','*BB12*'),1,0) as Flag
FROM ...somewhere...;
Then you can use an expression sum(Flag) in a textbox or chart to count these cases
If you just want to count how often AA12 occurs in MyString you can use substringcount(MyString,'AA12')