General information
Category:
Coding, syntax & commands
>>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,""))
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only