Ive run into an issue where I need to run 2 PL/SQL statements on Oracle in
a single cfquery tag. In my SQL developer, I can run 2 at a time using a
semi-colon as a delimiter but cfquery errors out on me saying the semi-colon
is an invalid character. Heres the query that Im trying to run:
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS';
SELECT SYSDATE as theDate, startDate, TO_CHAR(startdate, 'YYYY-MM-DD
HH24:MI:SS') as maskedDate
FROM bryanlghcollege.dmEvent;
This is just a test to see if the date is being formatted correctly. I read
that if I save the PL/SQL statements as a single variable and run it, it
would work but it didnt. Heres the code for that:
<cfsavecontent variable="sql">
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS';
SELECT SYSDATE as theDate, startDate, TO_CHAR(startdate,
'YYYY-MM-DD HH24:MI:SS') as maskedDate
FROM bryanlghcollege.dmEvent;
</cfsavecontent>
<cfquery name="pleaseRun" datasource="#application.dsn#">
#PreserveSingleQuotes(sql)#
</cfquery>
Does anyone have any ideas for me?
_____
Jake Churchill
CF Webtools
11204 Davenport, Ste. 200b
Omaha, NE 68154
HYPERLINK "http://www.cfwebtools.com"http://www.cfwebtools.com
402-408-3733 x103
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.19/953 - Release Date: 8/14/2007
5:19 PM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies
around the world in government. Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286251
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4