Hi
How i can do case insensitive query with LIKE operator?
case insensitive query
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: case insensitive query
Hello,
can you please describe in detail which query you want to use.
Which part of the query shall be checked case insensitive?
Best Regards
Leopold Knipp
Senior Support Specialist
can you please describe in detail which query you want to use.
Which part of the query shall be checked case insensitive?
Best Regards
Leopold Knipp
Senior Support Specialist
- m.sabitov
- Posts:23
- Joined: Fri Feb 21, 2014 7:20 am
Re: case insensitive query
SELECT ALERT '_alert_hdl.._text' FROM '*' WHERE '_alert_hdl.._text' LIKE "*Valve*" its work for "Valve", but not work for "valve" of "VALVE"
- thalter
- Posts:16
- Joined: Thu Nov 04, 2010 7:19 am
Re: case insensitive query
this should work
SELECT ALERT '_alert_hdl.._text' FROM '*' WHERE '_alert_hdl.._text' LIKE "*[v,V][a,A][l,L][v,V][e,E]*"
SELECT ALERT '_alert_hdl.._text' FROM '*' WHERE '_alert_hdl.._text' LIKE "*[v,V][a,A][l,L][v,V][e,E]*"
- m.sabitov
- Posts:23
- Joined: Fri Feb 21, 2014 7:20 am
Re: case insensitive query
maybe, but only for one word, i needed solutions for any words
- thalter
- Posts:16
- Joined: Thu Nov 04, 2010 7:19 am
Re: case insensitive query
If the SELECT is in a script you could convert the Search-Text with a function
Code: Select all
string convertText(string p_filterText)
{
string r_wert;
int i, i2, L1;
L1=strlen(p_filterText);
for(i=1;i- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: case insensitive query
Internally "LIKE" uses patternMatch(), however there is no way to tell it to ignore the case while comparing.
So: you can't
So: you can't
- m.sabitov
- Posts:23
- Joined: Fri Feb 21, 2014 7:20 am
Re: case insensitive query
Thank you Thomas, its good idea!
Martin you can think about implementing keyword UPPER and LOWER in wincc queri, its will very useful
Martin you can think about implementing keyword UPPER and LOWER in wincc queri, its will very useful