That depends- is it a number field or a character field?
Number=no
varchar=yes.
-Original Message-
From: Bosky, Dave [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 3:10 PM
To: CF-Talk
Subject: SQL IN command
Is it necessary to wrap the variable ProductsFound which is a list of
Nope, you don't need the quotes at all, because QuotedValueList() will put
them in for you. Adding them manually will cause an error.
-Original Message-
From: Janine Jakim [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 12:13 PM
To: CF-Talk
Subject: RE: SQL IN command
Dave:
The list, regardless of datatype, should never be enclosed in quotes.
However, if the list contains character values, than each value should be
enclosed in single quotes. For example:
Numeric - ... IN (1,2,3,4,5)
Text - ... IN ('a','b','c','d')
HTH
--
Mosh
Bosky, Dave wrote:
Is it necessary to wrap the variable ProductsFound which is a list of ID
numbers in single quotes?
CFSET ProductsFound = QuotedValueList(qProducts.product_id)
CFQUERY name=qRemoveProducts datasource=dsn
DELETE FROM tbl_products
WHERE product_id IN
4 matches
Mail list logo