How can you do a select in on more than 2100 values?
<cfquery name="result.qryData">
SELECT sub_acct_no, ...
FROM dbo.Closed_ORDER
WHERE ord_no IN <cfqueryparam cfsqltype="CF_SQL_varchar" value="#ValueList(qryOrd.ord_no)#" list="yes">
</cfquery>
Because of the ways that the tables are setup, linked Servers and JOINS are not an option.
When this is ran an error this thrown because there are new many fields being passed in.
IN
to, typically, about 1000 values. The way to do this is create a table - temporarily if need be - and use a JOIN. If nothing else it's a whole lot faster than anIN
clause. – Labio