>>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