Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
REPLACE - syntax
Message
De
19/03/1997 09:52:26
 
 
À
18/03/1997 23:25:35
Bill Gravell
Indoor Purification System
Menifee, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00024577
Message ID:
00024819
Vues:
40
>>>>>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform