Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Limitation of 24 elements in SELECT IN...?
Message
From
16/07/2008 13:13:06
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01331712
Message ID:
01331716
Views:
14
You are correct. I just found this:

There are also no hard-coded limits on the number of items in a SQL IN list. In versions prior to Visual FoxPro 9, SQL IN was mapped to the INLIST() function; that dependency has been removed. This change allows an increase in the number of arguments for IN and for better optimization. Visual FoxPro 9 stops evaluating expressions from the list as soon as the match is found. This is helpful if the IN condition is not Rushmore-optimized, as performance can be improved by placing the most-likely-to-match values at the beginning of the list. The total number of items is still indirectly limited by the SYS(3055) function, which controls buffer memory size, so the higher the setting, the more items are supported via IN. (See the Common Error Messages sidebar for more information.)

from:

http://www.vfpconversion.com/Article.aspx?quickid=0404022

Thanks Naomi...
>>A coworker is attempting to query (using vb.net) a free foxpro table and join it to a query from sql server 2000 using the 'IN' clause. The query error message returned states that there are too many elements in the IN clause????
>>
>>Is there an easy way to do this?
>>
>>Join a foxpro free table with a result from sqlserver? Right now he queries the foxpro table into a temporary table and then queries it looking for in... the sqlserver select.
>
>What is the exact query?
>
>If I'm not mistaken (and I think I am) IN in VFP versions prior to VFP9 was similar to INLIST() function that had the 24 items limit.
>
>E.g. myValue IN (val1,....) was the same as INLIST(myValue, ...). But I'm not certain about it.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform