SELECT xgts.rtgts_leit FROM gts02 xgts; WHERE xgts.rtgts_leit IN (291,273,266,259,249,246,240,238,231,218,210,209,200,; 181,170,169,165,159,153,150,146,141,115,108,105,102,; 91,85,75,49,41,33); INTO CURSOR cu_gtstreeI always receive error message "SQL expression is too complex". Help can't help me too much, the explanation of error 1845 is "Visual FoxPro ran out of memory when it tried to expand the SELECT statement in order to analyze it" What the hell does it mean? I have 32 Megabytes of RAM on board and do not think that it is small amount. I made some testing and found that the SQL statement above works only if number of items within parentheses less than or equivalent to 24. Does anybody have such an experience and what workaround can be used for this case? I got only one thought to made severall SQL's to reduce number of items within IN clause, but maybe there are other ways to skin a cat? TIA