>>>No, it's the INLIST limit. I've checked Help and I could not find anything specifying the limit explicitly. However, my colleage found it to be 159 and I also confirmed in a simple test.
>>
>>Is that dependant on sys(3055), sys(3050) or fixed even HW-Ram dependant ??
>>
>>curios
>>
>>thomas
>
>Seems to be fixed.
>
>Here is a test:
>
>select * into csrTemp7 from transact where sale_no in ;
>(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29, ;
>30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51, ;
>52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73, ;
>74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97, ;
>98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115, ;
>116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133, ;
>134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159)
>
>If you add one more, there would be an error.
That is not right. I remember my tests (was about speed not the limit) had more than 6000 items. Since you are not giving your exact syntax no way to guess what you might be doing wrong.
OTOH I wouldn't use IN () if the temcount is more or less than 5-10 items. I would instead join cursor/table.
PS: Since your SQL is T-SQL I assume you were asking the limit in SQL server. AFAIK there the limit is beyond what you can send from VFP (aka no limit).
And of course I guess you use a version where you corrected the typo.
Cetin