>>>>>>>Can someone help me with the syntax with REPLACE.
>>>>>>>
>>>>>>>REPLACE mytable.myfield with cSomething
>>>>>>>or
>>>>>>>REPLACE mytable.myfield with cSomething in mytable
>>>>>>>or
>>>>>>>REPLACE mytable.myfield with cSomething in "mytable"
>>>>>>>
>>>>>>>Tks
>>>>>>>Mike
>>>>>>
>>>>>>Use transparent syntax:
>>>>>>Select mytable
>>>>>>Replace mytable.myfield with cSomething
>>>>>Hi Ed,
>>>>>Do you have to select the table if you reference the field with the table alias as in mytable.myfield?
>>>>>Mike
>>>>
>>>>Actually not! But writing one more line of code you get clear readable syntax.
>>>
>>>Slower also! :)
>>>
>>>Vlad
>>
>>What is slower: writing the line or running the line?
>
>Beware when using REPLACE.....if you are at EOF() in the current work area, and issue: REPLACE alias.field with cSomething, then the replacement will NOT take place. I agree that INSERT SQL is the best....
>
>Bill
I agree that INSERT_SQL is fine, but sometimes we just need to 'replace' some field value, not creating new record. Checking of EOF() is important and basic foxpro idea.
Edward Pikman
Independent Consultant