Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Please explain NOFILTER
Message
De
17/06/2014 13:56:08
 
 
À
17/06/2014 13:29:43
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 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01601987
Message ID:
01601993
Vues:
45
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform