Oracle Alter Session not working in CF9
Hello,
I'm trying to understand differences between CF5 and CF9 when I retrieve numbers and dates from an Oracle Database.
The code I ran on CF5 and CF9 servers :
<cfoutput> <cftransaction> <cfquery datasource="intranet"> alter session SET NLS_TERRITORY = FRANCE </cfquery> <cfquery name="qry" datasource="intranet"> select TO_NUMBER(12345/10) as nbr, sysdate as dt, TO_CHAR(1234.56,'L99G999D99') as cur from dual </cfquery> </cftransaction> #qry.nbr#<br> #qry.dt#<br> #qry.cur# </cfoutput>
I've got those outputs :
| Result in CF5 | Result in CF9 |
|---|---|
| 1234,5 01/12/09 ¿1.234,56 | 1234.5 2009-12-01 19:16:04.0 ¿1.234,56 |
The first two rows in CF5 display data in French format. That's not the same for CF9, the data are in American format.
Then I changed the NLS_TERRITORY parameter
alter session SET NLS_TERRITORY = AMERICA
| Result in CF5 | Result in CF9 |
|---|---|
| 1234.5 01-DEC-09 $1,234.56 | 1234.5 2009-12-01 19:20:39.0 $1,234.56 |
The two first row haven't changed in CF9, it seems that the "alter session" has no effect on number and date format in query results. Is that a bug or am I misunderstanding something ?
Regards,
Maxime
