>While working with user I noticed that some fields (which were imported for an old system a long time ago) have binary data in them. These fields should have only alphanumeric data in them (a-z,A-Z,0-9), they are names, address, etc.
>
>Question is there a programatic way of safely fixing these fields? Too many values to do manually.
Try this ( not fully tested)
lcDigits = "0123456789"
lcLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
lcAllowedChar = lcDigits + lcLetters + Lower(lcLetters ) + Space(1)
Select mytable
SCAN
IF NOT Empty(Chrtran( myfield, lcAllowedChar, ""))
REPLACE myfield WITH Chrtran( myfield, ;
Chrtran( myfield, lcAllowedChar, ""), "")
ENDIF
ENDSCAN
--sb--