>>
>>********************************************************************
>>* Description.......: EditLenders.PrintM
>>* Calling Samples...:
>>* Parameter List....:
>>* Created by........: Nadya Nosonovsky 04/18/2000 11:28:42 AM
>>* Modified by.......:
>>********************************************************************
>>* Prepare cursor
>>local lnRecno, lcWhere, lcFor, lcOrder
>>select lender
>>lnRecno=recno()
>>lcWhere=filter()
>>if !empty(m.lcWhere)
>> lcWhere='where '+ m.lcWhere
>>endif
>>lcOrder=order()
>>if !empty(m.lcOrder)
>> lcFor=for(tagno(m.lcOrder))
>> if !empty(m.lcFor)
>> lcWhere=iif(empty(m.lcWhere),'where '+ m.lcFor, m.lcWhere + ' and '+ m.lcFor)
>> endif
>>endif
>>select a.code as lender, a.fullname as Full_Name, ;
>> a.ParentCode, c.short as ParentName, ;
>> a.status, a.category, b.fullname as CatName ;
>> from lender a inner join lendtype b ;
>> on a.category=b.code ;
>> inner join lender c on a.ParentCode=c.code ;
>> &lcWhere ;
>> order by 6 ;
>> into cursor curLenders
>>dodefault()
>>use in curLenders
>>select Lender
>>goto m.lnRecno
>>
>>I've tried to run it on the filtered index on Lender table and got a message: code is not unique and must be qualified.
>>
>>Here is lcWhere expression: where CODE#PARENTCODE.OR.PCOFLAG="P"
>>Obviously, I want to insert a. before code, parentcode, pcoflag. How can I do this string manipulation?
>>
>>BTW, just thought, that I should use at least two letters to aliases, but it doesn't change my question how to perform this string modification?
>
>pass where lender.CODE#lender.PARENTCODE.OR.lender.PCOFLAG="P"
>
I can't. Where is FILTER() AND FOR(), so it doesn't contain field aliases at the first place.
Here is the simple problem:
I have a string with field names and some symbols between them, e.g. > - + = #, etc. I want to replace each symbol with space+symbol+space. Is where a simple command to do it or I should do it in a loop for each symbol in a symbol strings? Not sure, if WSH is acceptable here, because I have Windows 95.
>lcWhere = strtran(strtran(lcWhere, 'lender.','a.'), 'lendtype.','b.')
>
>For other thing ask your collegue or select your records to a cursor.
>Cetin
If it's not broken, fix it until it is.
My Blog