WebServices: Adding to upper in sql query data to avoid case sensitive db configs

Description

Hi community,

Sometimes databases (in my case ORACLE 12) have case sensitive restrictions, so it's not possible create queries by matching. I added a simple UPPER sentence in the SQL creation to avoid it.

Before:
sqlBuilder.append(" AND ").append(field.getColumn()).append(" LIKE ?");

After:
sqlBuilder.append(" AND UPPER(").append(field.getColumn()).append(") LIKE UPPER");

Environment

None

Attachments

1

Activity

Show:

Carlos Ruiz September 17, 2019 at 2:53 PM

But - what if you want to find the specific case.

Suppose you have in C_Charge.Value the valuesASSETAsset

With the actual code you can find one record searching for the exact Value.

With the proposed patch you cannot find one record - it will always return two records, I guess that can be wanted in some cases but unwanted in other cases.

Regards,

Carlos Ruiz

Won't Fix

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

Created August 15, 2019 at 6:51 PM
Updated November 10, 2019 at 5:38 PM
Resolved September 17, 2019 at 2:53 PM