Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to identify garbage in a file
Message
 
 
To
01/02/2002 17:11:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00614300
Message ID:
00614337
Views:
19
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform