Re: ORACLE DATE INSERT ERROR.. Help.

2010-09-30 Thread daniel kessler

I receive the same error with that, "missing comma".  However, I have just had 
an epiphany and this worked:
#createODBCDateTime(registered.date_added)#

I didn't realize it needed to be an ODBC Date, nor do I really know what an 
ODBC date is. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337711
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ORACLE DATE INSERT ERROR.. Help.

2010-09-30 Thread Drew Nathanson

Daniel,

Try this:

to_date(, "mm/dd/ HH24:MI:SS") to do the insert. This will cause 
Oracle to interpret the date correctly.

-Drew Nathanson

> I have a date/time that I made using SYSDATE and inserted into an 
> oracle table.  It looks like "2010-09-30 13:34:17.0".  I have queried 
> for that date to insert into another table, but when I go to insert it, 
> I receive a "missing comma" error.  I assume that it has to do with 
> the date because when I remove the date or put in SYSDATE, it works 
> fine. 
> 
> What do I have to do to this date to make it reinsert-able?  I'd 
> prefer to not parse it and then remake it with createDateTime because 
> it seems it a fine date as-is.
> 
> 
> thanks for the help.
> 
> 
> daniel 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337710
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ORACLE DATE INSERT ERROR.. Help.

2010-09-30 Thread daniel kessler

I have a date/time that I made using SYSDATE and inserted into an oracle table. 
 It looks like "2010-09-30 13:34:17.0".  I have queried for that date to insert 
into another table, but when I go to insert it, I receive a "missing comma" 
error.  I assume that it has to do with the date because when I remove the date 
or put in SYSDATE, it works fine. 

What do I have to do to this date to make it reinsert-able?  I'd prefer to not 
parse it and then remake it with createDateTime because it seems it a fine date 
as-is.


thanks for the help.


daniel 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337704
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: ORACLE DATE INSERT ERROR.. Help.

2001-04-26 Thread Russ Conway

> 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-','Lisa' )"
> Data Source = "ADMS"

In addition to the error pointed out by Chis, the format for an abbreviated
month is MON. I wrote it like this for a test:

select to_date('26-Apr-2001','DD-MON-') from dual;

It returns:
4/26/01

Russell Conway
HallofSports.com, Inc.
351 West 22nd Street
New York, NY 10011
P (646) 638-2500
F (561) 423-2674
http://www.hallofsports.com
.. . . where the legends live on

>


~~
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



Re: ORACLE DATE INSERT ERROR.. Help.

2001-04-26 Thread dave fauth

You are missing a parenthesis after the completion of TO_Date section.

dave

At 11:30 AM 4/26/2001 -0700, you wrote:
>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-','Lisa' )" 
>Data Source = "ADMS"
>Here is the CF code:
>
>INSERT INTO emirf
>(FIRST_NAME, REQUEST_DATE, LAST_NAME)
> VALUES (
>'#form.first_name#',to_date('#DateFormat(Now(),'DD-MMM-')#','DD-MMM-
>','#form.last_name#') 
> 
>
>
>
>
~~
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



Re: ORACLE DATE INSERT ERROR.. Help.

2001-04-26 Thread G

You're missing a ')'.

- Original Message -
From: "Greenberg, Lisa" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, April 26, 2001 1:30 PM
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-','Lisa' )"
> Data Source = "ADMS"
> Here is the CF code:
> 
> INSERT INTO emirf
> (FIRST_NAME, REQUEST_DATE, LAST_NAME)
>  VALUES (
>
'#form.first_name#',to_date('#DateFormat(Now(),'DD-MMM-')#','DD-MMM-
> ','#form.last_name#') 
>
>
>
>
>
~~
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



RE: ORACLE DATE INSERT ERROR.. Help.

2001-04-26 Thread Chris Maloney

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


INSERT INTO emirf
(FIRST_NAME, REQUEST_DATE, LAST_NAME)
 VALUES (
'#form.first_name#',
to_date('#DateFormat(Now(),'DD-MMM-')#','DD-MMM-'),
'#form.last_name#')


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-','Lisa' )"
Data Source = "ADMS"
Here is the CF code:

INSERT INTO emirf
(FIRST_NAME, REQUEST_DATE, LAST_NAME)
 VALUES (
'#form.first_name#',to_date('#DateFormat(Now(),'DD-MMM-')#','DD-MMM-
','#form.last_name#') 
~~
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



ORACLE DATE INSERT ERROR.. Help.

2001-04-26 Thread Greenberg, Lisa

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-','Lisa' )" 
Data Source = "ADMS"
Here is the CF code:

INSERT INTO emirf
(FIRST_NAME, REQUEST_DATE, LAST_NAME)
 VALUES (
'#form.first_name#',to_date('#DateFormat(Now(),'DD-MMM-')#','DD-MMM-
','#form.last_name#') 
 



~~
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