Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to identify garbage in a file
Message
From
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:
00614305
Views:
22
This message has been marked as the solution to the initial question of the thread.
>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 !empty(chrTran(eval(lcChkExpr),chrtran(eval(lcChkExpr),lcBad,''),'')) ;
 into cursor crsBad
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform