Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change a few characters in a name field
Message
 
 
À
14/11/2011 09:52:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01528823
Message ID:
01528825
Vues:
53
>Hello,
>i have a database with a name column, but i want to make a test dataset with that same db but i want to move a few characters around so like
>change peter to aetep like replace all "A" with "P" but what ive found or what ive figured should work doesnt
>
>was just hoping someone could help me with an update query to run. would be a pain doing it manually.
>
>thanks
>
>
>
>Tried
>select replace(f_name,"o","a") but it says replace.prg isnt found

In SQL Server you will use REPLACE function to replace one character with a different character. You will need to pass this query using sqlexec function using valid connection handle.

In VFP the functions to replace one character with another are CHRTRAN and STRTRAN.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform