Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String and scan
Message
De
15/01/2002 04:23:00
Wilfred Chan
Bnp Paribas Hong Kong Branch
Hong Kong, Hong Kong
 
 
À
15/01/2002 03:40:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00604740
Message ID:
00604748
Vues:
22
Hi,

Try, strtran('a 1',' ','') for text replacing.

Second, because you are using "Update {table} SET field= {value}"
It means updating all records. Please see SQL book.
So, if you just want to update some records. You can.

1. replace {field} with {value} for not (empty(.....
2. SCAN FOR not (empty...
replace {field} with {value}
3. update {table} set {field}={value} where .......
4.......

:) Wilfred

>Hi all,
>
>I want to change the string 'a 1' to 'a1'. I have tired it with alltrim() method but it cannot work. any other functions can do it?
>
>For scan...endscan. I guess it is search reccord one by one. i have the following code:
>proc co_test
>use "c:\ccs program\conversion\cbpo\company.dbf"
>
>
>local cor_cbpol
>local cor_cbpom
>local cor_cbpos
>
>
>scan
> if empty(alltrim(co_refl))=.f. and empty(alltrim(cbpo_refl))=.t. lower
>
> update company set cbpo_refl='abc'
> endif
>
>endscan
>retu
>
>I just want some particular records which fullfil the condtion to be updated but all records are updated? why?
>
>Linda
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform