Reputation: 1328
I am running
<CFQUERY DataSource="#XXX.DSN#">
UPDATE FUNKUS_LIST
SET
<CFIF OPERATIONRECEIVED IS "Enable">
FUNKUS_STATUS_ID=<CFQUERYPARAM value="1"
CFSQLTYPE="CF_SQL_INTEGER">
<CFELSEIF OPERATIONRECEIVED IS "Revoke">
FUNKUS_STATUS_ID=<CFQUERYPARAM value="3"
CFSQLTYPE="CF_SQL_INTEGER">
</CFIF>
WHERE
FUNKUS_LIST_ID in (
<CFQUERYPARAM value="#form.dltCheckbox#"
CFSQLTYPE="CF_SQL_INTEGER"
LIST="Yes">
)
</CFQUERY>
in coldfusion MX7 with an oracle 9i database. What could possibly be causing:
Error Executing Database Query. ORA-01747: invalid user.table.column, table.column, or column specification
form.dltCheckbox should be a checkbox group on the form.
FUNKUS_LIST_ID is an integer column and the manual listed numbers are correct and valid IDs. OPERATIONRECEIVED is a string representing what should be done in this action form. I've confirmed all of the column and table names match
Upvotes: 0
Views: 1161
Reputation: 16955
You need to add the list = "true" attribute to your cfqueryparam:
WHERE
FUNKUS_LIST_ID in (
<CFQUERYPARAM value="#form.dltCheckbox#" LIST="TRUE"
CFSQLTYPE="CF_SQL_INTEGER"> )
... also add a closing paren
edit
In response to your comment - have you verified that OPERATIONRECEIVED is definitely either "Enable" or "Revoke"? If it is something other than those, then your SQL will be incomplete, since there will be no columns listed in the set clause.
Upvotes: 3