Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning all records with an SQL statement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00582293
Message ID:
00582321
Vues:
26
Put the whole where clause in the variable:

IF you want to filter records
lcWhere = 'WHERE
ELSE
lcWhere = ''
ENDIF

SELECT * ;
FROM table (lcWhere) INTO CURSOR cTemp

The string will either evaluate to blanks and you will not have a where clause which returns all records or whatever where clause you want which gives you only the filter condition. We do the same thing for joins and a lot of stuff in the SQL statement.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform