Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ali Koumaiha
  Where is Ali Koumaiha?
 Farmington Hills
 Michigan - Lebanon
 Ali Koumaiha
 To: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 Tags
Subject: RE: Please Help with query
Thread ID: 416280 Message ID: 416316 # Views: 43 # Ratings: 1
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Friday, December 26, 2014 5:37:27 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


Seems like you are re-creating your cursor.

do this prior to making your new cursor.

thisform.YourLeftGrid.RecordSource = ""
&& run your query and create new cursor.
thisform.YourLeftGrid.RecordSource= "PutTheNameOfYourCursor"
thisform.YourLeftGrid.Refresh()


Ez Logic

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