UPPER() clause in SQL in mendix

0
Hi, Can I know in mendix, how can I convert the below query.   SELECT employee_id, first_name FROM employees WHERE UPPER(first_name) = 'BRUCE';   I need to convert the column value to UPPER value and then pass the input as should in above query.
asked
2 answers
4

Unfortunately, this function is not existing in Mendix XPath and it depends on the Database if it is case sensitive or not. Some Databases are case sensitive, others are not.

Here is a blogpost I wrote about this:

https://medium.com/@gandy.mod/database-database-mendix-and-me-e9d54c63fb23

Depending on the amount of objects you need, you could try to use OQL to get a list of IDs and then retrieve all of these objects in a loop. But you only want to do this if the amount of results is very low.
Another option could be, to have an additional attribute on your object, where you store this name in lower case letters and always only do a lower case search. You could maintain the data in this attribute in a before commit event of your entity.

answered
3

Please, could you provide more information about your use case? Do you want to know how recreate the query with a microflow?

answered