Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REPLACE ALL, REPLACE ALL, REPLACE ALL, only 1st one work
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00404856
Message ID:
00405222
Views:
17
>So I can't mix ALL and FOR in the same REPLACE command? That's how I read it.
>
>I abandoned this whole idea a couple of hours ago and decided to just do SCAN...ENDSCAN with REPLACE commands in between. It really accomplished the same thing and I have more control over it (at least it feels like I do).
>
>But I still wanted to leave the question out here to get some answers for future reference and to find out where I went wrong. I was really putting some effort into getting the REPLACE ALLs to work, but when I got to thinking about it, I was reading the file from the top three times in a row which didn't sound like a good solution to me after all.
>
>I was only using REPLACE ALL because someone at work told me to do it that way. I should stop listening to the people at work and do it the way I know how to do it. At least I will get it done and not waste my time. LOL! This always happens when I listen to people at work. Where's Dilbert when you need him?!?

Why not UPDATE SET ... WHERE ... which is SQL compliant; rather than:

REPLACE ALL foo WITH bar FOR woof

UPDATE MyTable SET foo = bar WHERE woof
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform