Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If found()
Message
 
 
To
14/08/2007 09:39:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01247979
Message ID:
01248010
Views:
21
>hi,
>thank you for reply,
>i try it but error message syntax error
>
>SELECT Mstr.nam, Mstr.bank, Mstr.sheqno, Mstr.dat, Mstr.tra, S1.amount FROM Mstr ;
> inner join (SELECT nam,amount,bank,sheqno,dat,tra, SUM(amount) AS bill_total FROM Mstr ;
> on Mstr.Nam = S1.Nam and Mstr.Bank = S1.Bank and Mstr.SheqNo = S1.SheqNo ;
> and Mstr.dat = S1.dat ;
> ORDER BY Mstr.sheqno INTO CURSOR qTmp
>
>thanks
>>See changes inside.
>>

Don't include TRA into inner select. That was the idea of the new select, did I make this mistake myself?

E.g. it should be
SELECT Mstr.nam, Mstr.bank, Mstr.sheqno, Mstr.dat, Mstr.tra, S1.Bill_Total FROM Mstr ;
 inner join (SELECT nam, bank, sheqno, dat, SUM(amount) AS bill_total FROM Mstr ;
group by 1,2,3,4 where dat = m.ldStartDate) S1 ;
 on Mstr.Nam = S1.Nam and Mstr.Bank = S1.Bank and Mstr.SheqNo = S1.SheqNo ;
 and Mstr.dat = S1.dat ;
 ORDER BY Mstr.sheqno INTO CURSOR qTmp
Yes, I see I made a mistake myself when copied your select. Hopefully the new one is better and now correct.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform