Paul McNett wrote:
> MB Software Solutions General Account wrote:
>> VFP9SP1
>>
>> We've got a scenario where a 3rd party has polluted our memo fields, and
>> I'd like to write a cleanup that takes the value of the memo field and
>> does a STRTRAN to get rid of garbage.  Straight forward enough, right?
>> No, VFP is throwing an error saying "String is too long to fit."  So I
>> check the VFP system capacities and sure enough, that's the magic number
>> (16777184).
>>
>> What would you advise for Plan B in this case?  The memo is basically
>> polluted with bazillion quote marks.  I tried this but it fails with the
>> same message:
>>
>> REPLACE comments with STRTRAN(comments,replicate(['],1000),[]) all in
>> MyTable
>
> A bazillion quote marks, or 1000 like your REPLACE command?

Bazillion.  I figured if I used 1000 in my STRTRAN that I could knock
off most and just leave the last <1000 in there.  It would be ideal to
remove all of the extra crap, and I think I chose the 1000 instead of
something like 3 because I figured it would clean it up faster handling
larger chunks at a time.

>
> Where are the quote marks? After valid data, before valid data, or
> interspersed?

Interspersed...something like good text, following by literally
thousands of single quotes with some more text mixed in.  Rinse and
repeat.  Nasty looking.

>
> Get the data out of the memo fields, into a temp file, and use low-level
> file operations to parse the input file into an output file, and finally
> write the sanitized contents of the output file back into your memo field.

Looks like that's all I'll be able to do I guess.  Thanks.

>
> Don't ever REPLACE ALL. That shit is downright dangerous. ;)

"With great power comes great responsibility."   LOL!





_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to