How can I suppress UPPER(?) from appearing
Bob Stuart <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <a05200f00b9ff8d1675f9@[10.0.2.55]> |
When I do a caseInsensitiveLike I get sql similar to: SELECT t0.ACTIVE, t0.FIRST, t0.ID, t0.LAST, t0.MIDDLE, t0.MODIFIEDDATE, t0.MODIFIEDID, t0.PERSONPFOID, t0.PREFERRED, t0.TITLE FROM STUART.NAME t0 WHERE UPPER(t0.FIRST) LIKE UPPER(?) ESCAPE '\'" withBindings: 1:"Robert%"(first) Unfortunately DB2 appears to forbid scalar functions like UPPER being applied to a parameter. How/Where can I catch the SQL headed to the DB and modify it to look more like: SELECT t0.ACTIVE, t0.FIRST, t0.ID, t0.LAST, t0.MIDDLE, t0.MODIFIEDDATE, t0.MODIFIEDID, t0.PERSONPFOID, t0.PREFERRED, t0.TITLE FROM STUART.NAME t0 WHERE UPPER(t0.FIRST) LIKE ? ESCAPE '\'" withBindings: 1:"ROBERT%"(first) I know this will not work well for foreign languages since the upper performed in Java may not match the upper done by DB2 but it's much better than not being able to work at all. -- Bob Stuart