Wouldn't CHRTRAN() do exactly that?
>I'm in process of upsizing a fairly large VFP database to SQL 2005. I am working on uploading around a million records from a dbf to a sql table, and the dbf has a bunch of memo fields that have varying degrees of garbage characters in them (from an odd high ascii char to complete jibberish in the field).
>
>I've been searching here and so far have not found a way to efficiently strip garbage characters from a string. I'm not talking about a few characters - I want to remove anything that isn't alphabetic, numeric, a space, hyphen, CR, LF, or an apostrophe. Being able to specify an ASCII range for deletion would be my ideal solution.
>
>Does anyone know how to do this, or do I need to write some real ugly code to handle it?
--sb--