Skip to main content
Participant
March 31, 2008
Answered

Alter session in cfquery

  • March 31, 2008
  • 1 reply
  • 879 views
Hi everybody,

Should it be a possibility to use the alter session in a query ?
I would like to make something like this:
<cfquery>
ALTER SESSION SET NLS_COMP = LINGUISTIC;
ALTER SESSION SET NLS_SORT = GENERIC_BASELETTER;
select geo_indication from eccgis where country_fk = 'PT' and geo_indication like 'O%';
</cfquery>
As this is good in sqlDeveloper (oracle, without cfquery...), the query gives an error in Cf (semi-columns?).
Does anyone get an idee ?

Thanks in advance,
Michel
This topic has been closed for replies.
Correct answer mmcurtis
Thank you very much.

This is now resolved:
The sort order has also implications on the SEARCH mechanism
Looking for Oxxxxxx you do not find Óbidos
and now:
Search do not look at upcase and accent anymore.

Michel

1 reply

Inspiring
March 31, 2008
mmcurtis wrote:
> <cfquery>
> ALTER SESSION SET NLS_COMP = LINGUISTIC;
> ALTER SESSION SET NLS_SORT = GENERIC_BASELETTER;
> select geo_indication from eccgis where country_fk = 'PT' and geo_indication
> like 'O%';
> </cfquery>
> As this is good in sqlDeveloper (oracle, without cfquery...), the query gives
> an error in Cf (semi-columns?).

Try:
<cftransaction>
<cfquery>
ALTER SESSION SET NLS_COMP = LINGUISTIC
</cfquery>
<cfquery>
ALTER SESSION SET NLS_SORT = GENERIC_BASELETTER
</cfquery>
<cfquery>
select geo_indication from eccgis where country_fk = 'PT' and
geo_indication like 'O%'
</cfquery>
</cftransaction>

Jochem


--
Jochem van Dieten
Adobe Community Expert for ColdFusion
mmcurtisAuthorCorrect answer
Participant
March 31, 2008
Thank you very much.

This is now resolved:
The sort order has also implications on the SEARCH mechanism
Looking for Oxxxxxx you do not find Óbidos
and now:
Search do not look at upcase and accent anymore.

Michel