Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select with IN clause is giving an error
Message
De
15/09/2006 18:25:04
 
 
À
15/09/2006 18:22:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows Server 2003
Database:
Visual FoxPro
Divers
Thread ID:
01154265
Message ID:
01154303
Vues:
9
>>>Hi All,
>>> I am selecting records using in clause to select records from a vfp table. I get the following error when I execute the command. SQL expression is to complex. Any work around the in clause limitation.
>>>
>>>Here is my code:
>>>
>>>Local lcwhere
>>>lcWhere = "Mtgid 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,370)"
>>>
>>>select * from Batch where &lcWhere into cursor cTemp
>>>
>>>Thanks
>>
>>For VFP6, that's too many options. You'll have to put them into a cursor and do a "WHERE mtgid IN (SELECT mtgid FROM yourcursor)"
>
>
>The maximum number of options for INLIST() is 25. I think it is the same for SQL IN(). You might also try
>WHERE (mtgid IN (first 25) OR mtgid IN (second 25) etc)
That should work, too.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform