Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
i have written following code- Wildmatch( Description,'*' & [Machine_Name] & '*').
Data can have following values,
Description:-
123456
612345
abcde
eabcd
abcd e
1234 5
1234cd
Machine name
1234
abcd
With my code, it will pick in following way:-
123456, '*1234*' =Match -This is not required (No Digits after matched substring)
612345, '*1234*' =Match -This is not required (No Digits before matched substring)
abcde, '*abcd*'=Match -This is not required (No characters after matched substring)
eabcd, '*abcd*'=Match -This is not required (No characters before matched substring)
abcd e,'*abcd*'=Match - This is required
1234 5,'*1234*=Match - This is required
1234cd,'*1234*'=Match =This is required
What should i change in my code to get it.
May be this?
LOAD * from Source Where Not WildMatch(Description,'*1234*', '*abcd*') or SubStringCount(Description, ' ');
OR
LOAD * from Source Where Not WildMatch(Description,'*1234*', '*abcd*') or Index(Description, ' ') >0;
Description may have 100 characters in it and hence space might be present somewhere else.
Can we write some code to check if character just after/before the matched string is not number, only then consider it ?
Can you provide 20 Different values in real data. that may useful to debug where we are?
Hi,
Not fully understood result. The last line is required, although the result Match is the same as the first line. Are there any requirements for the presence / absence of letters / numbers in [Description] to determine attribute [Machine name]?
Regards,
Andrey
Hi,
Have a look at the attached application.
Regards,
Kaushik Solanki
Hi
There is a function in the QVC (GitHub - RobWunderlich/Qlikview-Components: A library for common Qlikview Scripting tasks) to made applymap functions with wildcards. Is called Qvc.CreateWildMapExpression
It can be a good solution
Regards