Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Empty() vs 2 quotes
Message
De
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:
01526806
Vues:
70
>>HI
>>
>>After many years using VFP I have problems and am insecure when using lines below:
>>
>>replace all state with "SP" for empty(state)
>>
>>or
>>
>>replace all state with "SP" for state = " "
>>
>>I am afraid of using command and overwrite states that are already filled.
>>
>>Many sates are already filled with "MG"
>>
>>Could anybody give me some practical examples, when using one or another ?
>>
>>
>>Moises
>
>You can use
>
>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,""))
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform