Have you tried to quote the last item in the values list (the year)?
Depending on how that is defined in the database, it may require quotes.

Instead of:
#year(foodate)#

Try:
'#year(foodate)#'

HTH
Steve

On Fri, Nov 11, 2011 at 1:22 PM, Greg Morphis <[email protected]> wrote:

>
> Same error.. WTH?
> foodate is today.. 11/11/2011
>
>
> Error Executing Database Query. Syntax error in INSERT INTO statement.
> The
> error occurred in
>
> *C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\Production\TWST\time_off_save.cfm:
> line 53*
>
> 51 :
>  '#session.user.employee_id#',
> 52 :
>  #createodbcdate(now())#,
> *53 :                                                   #year(foodate)#*
> 54 :                                            )
> 55 :                            </cfquery>
>
> ------------------------------
> SQL    INSERT INTO time_taken ( time_off_id, employee_id, date_taken,
> notes, actionuser, actiondate, year ) VALUES ( 'VV', 'e0012345', {d
> '2011-11-11'}, '', 'e0012345', {d '2011-11-11'}, 2011 ) DATASOURCE
>  blurrrrrred_text
> On Fri, Nov 11, 2011 at 12:13 PM, Greg Morphis <[email protected]> wrote:
>


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

Reply via email to