Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scanning a field and replacing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01019759
Message ID:
01019772
Vues:
19
>Yes, basically this field can be used to add more comments. All I want to do is firstly scan to see if 'Img Submit' is there. If not then add it to the end of the comments. If it is there then at whatever piont it is there then replace the Img Submit to Img Re-submit.
>
>Thanks

What about:
DO CASE
   CASE [ Img Submit ] $ MyField
         REPLACE MyField WITH STRTRAN(MyField,[ Img Submit ], [ Img Re-Sumbit ])
   CASE [ Img Re-Submit ] $ MyField
         REPLACE MyField WITH STRTRAN(MyField,[ Img Re-Submit ], [ ????????? ])
OTHERWISE
         REPLACE MyField WITH MyField + [ Img Submit ]
ENDCASE
But this will replace ALL instances of "Img Submit" or "Img Re-Submit" with the new values.
If you have "Img Submit" more then once you'll get "Img Re-Submit" exactly same numbers of occurancies after replace.
I don't know if this will works for you.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform