Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select
Message
 
To
03/03/2007 15:20:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Select
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01200541
Message ID:
01200542
Views:
22
>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."
Previous
Reply
Map
View

Click here to load this message in the networking platform