Can you change to passing in a table of numbers for your IN () section?
Not sure if you can pass a table in to SQL Server using VFP, I've only ever done that in .NET. Maybe Google Table Valued Parameters and VFP.

Alternatively CREATE a TEMP table in SQL Server with the numbers and then join on that?

Frank.

Frank Cazabon

On 08/03/2013 10:21 AM, Paul Hill wrote:
Msg 8623, Level 16, State 1, Line 2
The query processor ran out of internal resources and could not produce a
query plan. This is a rare event and only expected for extremely complex
queries or queries that reference a very large number of tables or
partitions. Please simplify the query. If you believe you have received
this message in error, contact Customer Support Services for more
information.

Paul: 1 - Microsoft: 0

:-)

UPDATE tblContacts SET Permanent=1 WHERE Number IN (
'1000001','1000002','1000003',...
  [snip 1000s of lines]



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to