Your parenthesis are incorrect... your CF code should be this

<cfquery name="requestInsert" datasource="#Application.SMInfo#">
INSERT INTO emirf
(FIRST_NAME, REQUEST_DATE, LAST_NAME)
 VALUES (
'#form.first_name#',
to_date('#DateFormat(Now(),'DD-MMM-YYYY')#','DD-MMM-YYYY'),
'#form.last_name#')
</cfquery>

you missed the closing parenthesis on the to_date() function


-----Original Message-----
From: Greenberg, Lisa [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 1:31 PM
To: CF-Talk
Subject: ORACLE DATE INSERT ERROR.. Help.


I'm trying to insert a date into an Oracle table and get the following
error.  Help!!

 Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00917: missing comma.
SQL = "INSERT INTO emirf (FIRST_NAME, REQUEST_DATE, LAST_NAME) VALUES (
'Lisa',to_date('26-Apr-2001','DD-MMM-YYYY','Lisa' )"
Data Source = "ADMS"
Here is the CF code:
<cfquery name="requestInsert" datasource="#Application.SMInfo#">
INSERT INTO emirf
(FIRST_NAME, REQUEST_DATE, LAST_NAME)
 VALUES (
'#form.first_name#',to_date('#DateFormat(Now(),'DD-MMM-YYYY')#','DD-MMM-YYYY
','#form.last_name#') </cfquery>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to