Discussion Board for collaboration on QlikView Scripting.
I have a question regarding searching for a specific string.
Lets say I have data:
In Key ABC, I have to find the CODE (AB) in FIELD1 (G-H-G-H-G-A-B-AB-ABC).
How do I do this?
Go to Solution.
you can use like below. Please find the attachment.
if(SubStringCount(FIELD1,CODE)>0,'PRESENT','ABSENT') as CODEFLAG
FindOneOf(text , characterset [ , n])
so in your example,
if zero is returned it cannot find it.
Try this code
Load * resident Table1;
Load * resident Table2;
LOAD *, If(WildMatch(CODE, FIELD1) > 0, 'OK', 'NO') as is_in_field Resident TMP;
DROP Table TMP;
And how should your result look like? You need to show starting position of this CODE in FIELD1?
thanks this is what I'm looking for. My other question is, what if field1 contains ACB instead of ABC, how can I fix it in alphabetical order?