Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Empty() vs 2 quotes
Message
 
 
À
18/10/2011 16:02:46
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01526798
Message ID:
01526807
Vues:
66
>>update States set State = 'SP' where Len(State) = 0 && Empty state
>
>I am not sure that is such a good idea.
>
>len(null) returns .null.
>len(' ') returns 2
>empty(null) returns .f.
>
>In this case I use empty(nvl(state,""))

You're right, I was thinking about SQL Server. Although in SQL Server LEN(NULL) will return null.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform