How can I bypass case-sensitive values when checking for duplicates using Groovy?
You can convert the values that you're comparing to upper case before checking for duplicates.
To filter out case-sensitiveness in the fields, you can use the upper()
function. If you're not sure whether the operand value is in uppercase, you can use the
upper()
function around the operand as follows:
-
upper(JustificationCode) = 'BRK'
-
upper(JustificationCode) = upper(:codeVar)
-
upper(JustificationCode) like upper(:codeVar)||'%'