Hi,

I have a simple update query that is throwing an error:
<cfquery name="NewRec" datasource="#Application.DSN#">
        update icitem
        set lastchanged = '1/1/2008'
        where itemno in (#itemnos#)
</cfquery>

The itemnos variable has the value:
'1A703239', '1A703240', '1A703241', '1A703242', '1A703243'

If I paste that value in between the parens, it works.  I've also tried using 
double quotation marks.  The error I'm getting is:

 Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Line 3: Incorrect syntax near '1'.
 
The error occurred in D:\sites\qcliving.com\htdocs\Admin\kludge.cfm: line 23

21 :                            update icitem
22 :                            set lastchanged = '1/1/2008'
23 :                            where itemno in (#itemnos#)
24 :    </cfquery>

SQL        update icitem set lastchanged = '1/1/2008' where itemno in 
(''1A703239'', ''1A703240'', ''1A703241'', ''1A703242'', ''1A703243'')
DATASOURCE        qcliving
VENDORERRORCODE           170
SQLSTATE          HY000

What am I missing here?

Thanks!

--Ben 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314315
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to