Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apostrophes and Replaces
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00396125
Message ID:
00396149
Vues:
9
>>>>How can I use the REPLACE command with a field that contains an apostrophe in it? For example, REPLACE cPrefix WITH "Women's Hospital, Flint" WHERE blah, blah ...
>>>>
>>>>thanks
>>>
>>>I tried that command just now and it worked. If you surround it with double quotes it should work. What error are you getting?
>>
>>If the intent is to replace the field with exactly "Women's Hospital, Flint", trying putting it into a variable, like this
>>
>>repstr = '"Women'+"'s Hospital, Flint"+'"'
>
>I tried your way which put quotes around it, which you dont need. So I changed it to:
>
>repstr = 'Women'+"'s Hospital, Flint"
>
>And it replaced ok with the statement:
>
>replace fieldname with repstr
>
>I did not have a condition after it though.

I was assuming he actually wanted the double quotes as part of what was replaced, otherwise I agree with you
Mike

"I can live with doubt and uncertainty and not knowing. I think it is much more interesting to live not knowing than to have answers that might be wrong." - Richard Feynman
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform