I am in the process of updating some old Access/SQL queries to run in a MariaDB environment. The following update statement is causing me problems. I've been working through it, but still haven't resolved it. I did try replacing Nz with COALESCE(). I also made note that StrComp is now STRCMP in MariaDB. It seems that STRCONV doesn't exist in MariaDB. 
My question is: what does the following code do, and how can I reproduce this in a MariaDB-friendly way?
UPDATE ft.contacts
SET firstname = StrConv(firstname,3)
WHERE (((firstname)>"") 
AND ((StrComp(UCase(Nz(firstname)),Nz(firstname),0))=0)) 
OR (((firstname)>"") 
AND ((StrComp(LCase(Nz(firstname)),Nz(firstname),0))=0));
 
    