Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: Angelo Andales
  Where is Angelo Andales?
 Manila
 Philippines
 Angelo Andales
 Tags
Subject: RE: Please Help with query
Thread ID: 416280 Message ID: 416315 # Views: 45 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Friday, December 26, 2014 5:08:33 PM         
   


> Hi,
>
> Merry Christmas and have a Happy Blessed New Year to all.
>
> I have problem with my query using
JOIN
. I already tried the Inner, left and right and even the full join but I can not get what I wanted to achieve.
>
> Here is my code.
>
>
SELECT CurBill.cMeterNumber, CurBill.dBillingDateProcess, CurBill.nPrevReading, CurBill.nCurrentReading, CurBill.nCurrentReadingAmount, CurBill.nSurcharge;
> , CurBill.dDueDate, CurPay.cMeterNumber, CurPay.dDateOfPayment, CurPay.nAmount;
> 
> FROM tblBilling CurBill	INNER JOIN tblBillingPayment CurPay;
> 	ON CurBill.cMeterNumber = CurPay.cMeterNumber;
> 	WHERE (ALLTRIM(CurBill.cMeterNumber) = ALLTRIM(thisform.txtMeterNumber.Value)) ;
> 		ORDER BY CurBill.dBillingDateProcess INTO CURSOR CurList
> 

>
>
> Here is the result of the query using two tables namely the tblBilling and tblBillingPayment.
>
>

You need a datq structure that lets you uniquely identify which bill a payment belongs to. You have the sam cmeternumber for two diffewrewnt bills.

About the blank grid. What is the Grid.RecordSource for you leftside grid?
-Anders

ENTIRE THREAD

Please Help with query Posted by Angelo Andales @ 12/26/2014 2:51:32 AM
RE: Please Help with query Posted by Anders Altberg @ 12/26/2014 5:08:33 PM
RE: Please Help with query Posted by Ali Koumaiha @ 12/26/2014 5:37:27 PM
RE: Please Help with query Posted by Angelo Andales @ 12/27/2014 6:53:02 AM
RE: Please Help with query Posted by Jun Tangunan @ 12/26/2014 10:41:44 PM
RE: Please Help with query Posted by Angelo Andales @ 12/27/2014 8:09:10 AM
RE: Please Help with query Posted by Jun Tangunan @ 12/27/2014 8:25:51 AM