Thanks, i will check it up and intimate.
>>Instead, If I try this code it seems to work some faster
>>
>>Update New_bills Set Exchange=(Select Exchange From Master Where Master.Accountno=New_bills.filename) and after getting the name of exchange in My New_bills I will Update Newpath.
>>
>>But the problem using the above command is that I get NULL Values in the field exchange for the filename with are not accountno in Master.dbf, Instead of NULL Values I need 'MISSING EXCHANGE'.
>>
>>I.e for the values for which there is match I need the proper exchange code and for which there is no match I need 'Missing exchange'
>>
>>The SQL code which you provided earlier perhaps dont take E into consideration. E=ALLTRIM(Exchange) in my origininal code.
>>
>
>Yes, I failed to notice that you were actually using the value of E. Not difficult to change the code I gave you, though:
>
>>cPath = ADDBS(tDirectory+pBillmonth+'-'+ALLTRIM(STR(pbillyear)))
>
>
>* Handle the ones that match first.
>UPDATE NewBills ;
> SET MissExg = 1, ;
> NewPath = FORCEPATH(FORCEEXT(FileName, "PS")+"\" + ALLTRIM(Master.Exchange), m.cPath) ;
> FROM Master ;
> WHERE NewBills.FileName = Master.AccountNo
>
>* Handle the ones with no match.
>UPDATE NewBills ;
> SET MissExg = 0, ;
> NewPath = "Missing Exchange";
> WHERE FileName NOT IN (SELECT AccountNo FROM Master)
>
>
>Tamar
Harsh