Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verifying two SQL commands
Message
De
20/02/2008 15:37:17
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Verifying two SQL commands
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01294455
Message ID:
01294455
Vues:
63
So far, when having the need to get all records where a specific field is not empty, I was using something like this:
SELECT * From MyTable WHERE LEN(ALLTRIM(MyField))>0
But, I need to adjust that SQL so it would fit for either VFP or SQL Server. So, I thought about something like this:
SELECT * From MyTable WHERE MyField>""
or
SELECT * From MyTable WHERE MyField>" "
But, to my surprise, only the 2nd one works. The first one doesn't return any record. Isn't the first suppose to be the same as the second one?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform