Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
As per the image below, the function
-- Where wildmatch("Object number",'OR%')>0
was not working. I couldn't figure out why it wasn't working but had tracked the problem down to here. So, I tested the alternative approach
-- Where Left("Object number",2)='OR'
Which worked.
I no longer have a problem, but I do have a curious learning point as I cannot possibly explain why the original function didn't work. Any ideas?
"%" is not a Qlik wildcard character. So your expression would only match the case-insensitive string "OR%". Is that what you intended? If you are trying to match "OR" followed by an single character the mask would be 'OR?'.
-Rob
"%" is not a Qlik wildcard character. So your expression would only match the case-insensitive string "OR%". Is that what you intended? If you are trying to match "OR" followed by an single character the mask would be 'OR?'.
-Rob
@Andrew_ENT
As @rwunderlich said, ‘%’ is not a character used in Qlik, you can use ‘*’:
For example in SQL, you will filter the values that start with OR by doing something like
Where Filed like 'OR%', for Qlik you can do it like Where WildMatch(Filed,'OR*')>0;
note: This way it filters both upper and lower case letters
- Matheus
Try: Where wildmatch([Object number],'OR*')>0 - this does the wild search on 'OR' but wil search on charaters that are right to 'OR', '*OR*' - this does wild searh and returns all the field values that contan 'OR' no matter where the location of 'OR' in the field value is.
- Where Left("Object number",2)='OR' - this looks only for 'OR' in the first 2 characters of the field value.
Ahhh of course, when I write it in Qlik I do use * but this was copied across from a SQL script and edited. Thanks for spotting this. Sometimes you can be staring at something so long that you cannot see the wood for the trees!