update query
Hi All,
I have this query in CF9:
//create an empty query to work with
variables.qryFoo = queryNew("myID","DOUBLE");
//add a row and fill it with some data
queryAddRow(qryFoo);
querySetCell(qryFoo,"myID","1");queryAddRow(qryFoo);
querySetCell(qryFoo,"myID","2");
Here is my update statement:
<cfset myIDs = valueList( qryFoo.myID ) /><cfquery datasource="#application.str_dsn#">
update myOtherTableset trueValue = 1
where myID in ( #myIDs# )
</cfquery>
It works fine until it reaches more than 1000 ids. I am getting this error:
ORA-01795: maximum number of expressions in a list is 1000
I found this statement:
"You cannot have more than 1000 literals in an IN clause. You can, however, have SELECT statements in your IN clause which can return an unlimited number of elements i.e."
I try to do an update inside of Q of Q but i cannot do it:
There was an error processing the update. <br><b>Query Of Queries syntax error.</b><br>
Encountered "update.
Error Executing Database Query.
Anyone has an ideas who to perform this update for more than 1000 ids?
Thanks in advanced.
