Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REPLACE - syntax
Message
From
19/03/1997 09:52:26
 
 
To
18/03/1997 23:25:35
Bill Gravell
Indoor Purification System
Menifee, California, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00024577
Message ID:
00024819
Views:
44
>>>>>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform