Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to identify garbage in a file
Message
 
 
À
01/02/2002 17:11:05
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00614300
Message ID:
00614337
Vues:
20
>>Hi everybody,
>>
>>I have a program, which converts old legacy files into BldMstr like files. It does it by doing some select statements. Now, I've checked the files and I found some garbage records in them along with the normal records. These garbage like records contain || symbols in most of the fields (chr(13)). My question is: how can I get rid of these records programmatically during select statement?
>>
>>Thanks a lot in advance.
>
>Something like this :
>
lcBad=''
>for ix=0 to 31
> lcBad=lcBad+chr(ix)
>endfor
>
>lcChkExpr = 'MyCharField1+myCharField2'
>select * from myTable ;
> where chrtran(eval(lcChkExpr),lcBad,'')==eval(lcChkExpr) ;
> into cursor crsNotBad
>
>Cetin


Cetin,

Thanks a lot. Currently I just put where asc(town)<>0, but I like your solution better, so I'll adopt it on Monday.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform