SELECT * FROM MarketTable WHERE customer LIKE "ABC"
This returns only ABC. I want this to return ABC, aBC, abc, etc.
Is there something close to ILIKE in kDB+?
Even functions like lower or tolowercase would help, but I do not think these are available. As in java we have string.tolowercase.
q)t:([] b:1 2 3; a:("abC";"aBc";"AbC"))
q)t
b a
-------
1 "abC"
2 "aBc"
3 "AbC"
q)select from t where upper[a] like "ABC"
b a
-------
1 "abC"
2 "aBc"
3 "AbC"
q)select from t where lower[a] like "abc"
b a
-------
1 "abC"
2 "aBc"
3 "AbC"
However this way the conversion has to happen on each query. Faster to store the column in the format that it will be queried.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With