In your Suggested SQL also the First Two records are Same. Why ? How to Overcome That ?
I have Gone Through the Tutorial Provided in the Link. Now I am able to use LEFT JOIN to Merge Two Tables as per my Requirement. I am using this Command
>>
>>
>>Select A.FileName,A.InvoiceNo,A.Phoneno,A.N_month,A.Amtpayable,M.ExCHANGE,M.FIRSTNAME,M.LASTNAME,M.INSTALDATE
> FROM AMOUNTPAYABLE A LEFT JOIN MASTER M ON A.FileName=M.AccountNo
>>
>>
>>But Now I have another Table and yet another. In Such cases How will I now Add. Suppose I need Column PREVBALAMT From PREVBAL. PREVBAL has also the same common filed FIlename. What Would be the revised SQL For adding Multiple Tables.
>>
>>
>>
>Just keep LEFT JOINing to your other tables e.g.
>
>
>Select A.FileName,A.InvoiceNo,A.Phoneno,A.N_month,A.Amtpayable,Mstr.ExCHANGE,Mstr.FIRSTNAME,Mstr.LASTNAME,Mstr.INSTALDATE
> FROM AMOUNTPAYABLE A LEFT JOIN MASTER Mstr ON A.FileName=Mstr.AccountNo
>LEFT JOIN PrevBal PB ON A.FileName = PB.FileName
>
>Also, it's a bit dangerous to use a-m letters as aliases of the tables in the select statement when we're talking about VFP data. You may better use 2 letter aliases.
Harsh