Rfactoring sql strings to upper case