Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select
Message
 
À
03/03/2007 15:20:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Re: Select
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01200541
Message ID:
01200542
Vues:
24
>Hi
>
>I'm doing
>
>SELECT MyCursor.Campo1, MyCursor.Campo2 ;
> FROM MyCursor ;
>WHERE "ABC" $ MyCursor.Campo2 ;
>INTO CURSOR MyCursor2
>
>and I want a cursor MyCursor2 that has all the records where Campo2 contains the string "ABC".
>But it doesn't filter anything, it just brings all the records.
>What am I doing extremly wrong?
>Thanks
>Hernan


Hernan,

Add the NOFILTER option to your select statement;
SELECT MyCursor.Campo1, MyCursor.Campo2 ;
   FROM MyCursor ;
WHERE "ABC" $ MyCursor.Campo2 ;
INTO CURSOR MyCursor2 NOFILTER
In order to optimize the speed of your select VFP may be simply using the original cursor (MyCursor) with a SET FILTER on it. By using the NOFILTER option you are telling VFP "never mind how fast you can do it just make sure you actually create a new cursor with only the records I want in it."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform