Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If found()
Message
 
 
À
14/08/2007 09:39:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01247979
Message ID:
01248010
Vues:
22
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform