Case-insensitive sort, is it possible?
737600Nov 27 2009 — edited Dec 1 2009Hello everybody,
I am trying to make an application do case-insensitive sorts, but I failed miserably. I wonder if anyone went through the same problem...
In a regular Oracle session, all I would have to do is to set NLS_SORT parameter as BINARY_CI and the sort would be case-insensitive; however, my Apex application solemnly ignores everything that I try to do in that direction.
First I tried to create a processes setting the db parameter in the session (executing a PL/SQL code "execute immediate 'alter session.....'"); tried to put that process inside a page, in many process points, and then tried to put that process in the application itself; in both cases, if I debug the page, I see that the command is being executed successfully.
And, in fact, the first time the report is executed, and the query appears in the debug, the CI sort works; however, if I try to reload the page with an F5, or change anything in the Search Bar (# of rows per page, filter, etc), the sort regresses to the case-sensitive form. It is probably getting the records not from the query, but from some weird cache, because any time the sort isn't working anymore, the debug does not show the query being executed.
Then I tried to investigate where is this cache and how to kill it, to absolutely no avail. Tried to create another process to clear all the session state, tried to logout and in again, tried to kill all APEX database sessions, close the browser and delete all of its cache... the cache with the wrongly sorted records survived all of that.
Oh, and even though some times the sort works for the records in the report, when I click on the column header related to the field in question, and it shows all the values for that column, the order of those values is never affected by the NLS_SORT session parameter.
Could anyone have an insight on this matter?
Thank you.