Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT-SQL IN() problem
Message
From
18/11/2008 22:06:48
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
18/11/2008 10:21:07
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01359275
Message ID:
01362756
Views:
35
>The values aren't actually in a series. I'm just using the series to define the problem.

Other than creating a script if the number of values was moderate (up to about 20), my solution was usually to insert them into a single column cursor and then ...where fld1 in (select dummyfld from crsValues)... which works in SQL and DBF. The limit for SQL is actually higher, and I was able to insert about a hundred values into a SPT command, but then just found that I don't need to do that at all - found a better way for that particular case, and another case didn't pop up since.

>>Why not use BETWEEN(fld1,1, 25)
>>>Hi all,
>>>Given the code snippet below, this one will not work in VFP8SP1. It will generate the "SQL expression is too complex (Error 1845)" error.
>>>
>>>close databases all
>>>create cursor xxx (fld1 i)
>>>select * from xxx ;
>>>	where fld1 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)
>>>
>>>
>>>I know that this will work in VFP9 but what I'm wondering is that, I can't find any documentation in VFP8SP1 regarding this error. :(
>>>
>>>Is there a VFP8 runtime fix for this?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform