Fix to circumvent sqlites poor upper/lower functions