I have a table like the following image
I need to get all the English words that its Kurdish Word contains "بةرز",
So i cant use
select English from Table1 where Kurdish like '%بةرز%';
because it also accepts the words that are sub-string in another word like these ،يبلبةرز ، سيس بةرز
,
And when i try to use Regular Expression in my query:
query = "SELECT English FROM Table1 WHERE Kurdish REGEXP '^[.، ]*("+"بةرز" +")[ ،.]*$'";
s.execute(query);
it shows the following Exception
net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.1 data type of expression is not boolean
Is the problem is with my regular expression or what?
Note that i'am using UCanAccess for my database connection
Instead of
I believe you need to use
This seems to work for me ...
... although there might be a more elegant way of doing it.