Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FPD25 - REPLACE ... WHILE ... is ALL reqd.
Message
De
06/03/2003 01:58:39
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00761380
Message ID:
00762007
Vues:
26
No ALL is not an option with WHILE. It'd fail unless first key is what you're looing for. I never saw it fail.
Forget UPDATE. I missed FPD25 in title.
Same applies to scan and other commands with a scope. If you want to use ALL option you can do it with set key :

set key to m.id
replace all .... with ...

Cetin


>I am not chnaing the id so in that case is ALL okay. I have this situation where generally this code works and in around 2% of the cases this fails, why I can understand. Does the same apply to SCAN
>
>I have never used UPDATE is it more reliable and fast, that was the reason for SEEK and REPLACE WHILE.
>
>>>Hi All
>>>
>>>I have these lines:
>>>
>>>
SEEK m.id
>>>REPLACE ... WITH ... WHILE dbf.id = m.id
>>>
>>>Is this okay cause at time I have found it to fail. Is the failure my otherwise problem or this command problem. Is ALL required as below?
>>>
>>>
SEEK m.id
>>>REPLACE ALL ... WITH ... WHILE dbf.id = m.id
>>>
>>>Please advise
>>
>>No ALL is not needed. It might fail if you're changing the id field.
>>You can use 'for' in that case or update-sql :
>>
>>REPLACE ... WITH ... FOR dbf.id = m.id
>>
>>or :
>>update myTable set fieldname = value where id = m.id
>>
>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform