Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: cf query - wanting to set nls date

Re: cf query - wanting to set nls date

From: IANAL_VISTA <IANAL_Vista_at_hotmail.com>
Date: Wed, 27 Jul 2005 01:45:23 GMT
Message-ID: <Xns969FBED0FFFBFSunnySD@68.6.19.6>


"mike" <hillmw_at_charter.net> wrote in
news:1122422129.254182.49640_at_f14g2000cwb.googlegroups.com:

> I have a cf query where i want to set the date format before the query
> executes.
>

><CFQUERY NAME="RptQry" datasource="#ds#" username="#user#"

> password="#pass#">
> alter session set NLS_DATE_FORMAT = 'MM/DD/YYYY';
> select * from abc where mydate='7/27/2005';
></CFQUERY>

>
> I am getting an error here, not being able to put these together.
>
> My query is using the date format '7/27/2005', but the sql is expecting
> it to be '27-Jul-2005'.
>
> I'd like to be able to alter the session before this sql runs.
>
> Is there a better way?
>
>

YES never, ever, never, ever depend upon implicit variable transformations.

Use TO_DATE in this case! Received on Tue Jul 26 2005 - 20:45:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US