Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Please explain NOFILTER
Message
From
17/06/2014 13:56:08
 
 
To
17/06/2014 13:29:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01601987
Message ID:
01601993
Views:
44
>I'm having trouble understanding what the purpose is for NOFILTER. I often do not specify NOFILTER and then I use the cursor in a subsequent SQL statement without any apparent problem.
>
>Also, I've heard the following statement:
>
>"I believe VFP 5 doesn't have the NOFILTER clause; therefore I included an extra field in the following SQL, which should produce the same effect."
>
>
>SELECT CustNo, Sales, .T. as DummyField FROM Table1;
>  UNION ALL SELECT CustNo, Sales, .T. as DummyField FROM Table2;
>  INTO CURSOR Temp
>SELECT CustNo, sum(Sales) as Sales;
>  FROM Temp INTO CURSOR TempSummary
>
>
>How does this take the place of NOFILTER?

There is a good explanation at http://www.ml-consult.co.uk/foxst-09.htm . In your example above, the extra DummyField breaks one of the conditions so that forces VFP to not use a filter.

Another reason to use NOFILTER is if you want to use commands that expect a file system presence e.g.
SELECT (something that ends up creating a filter) INTO CURSOR Temp

SELECT SomeOtherTable
APPEND FROM DBF( "Temp" )
* Above fails with "file does not exist"
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform