the following command works fine in VFP 6, but won't work with VFP 9. I get
a "1807: SQL: group by clause is missing or invalid". What is wrong with
it?! (something silly I've missed I bet)
select Creditor.CreditorCd, Creditor.AddrRecID, ;
GetDisc(Creditor.PromptTerm) as Discount, ;
CredTran.CrTranID, TranDate, PayBy, Reference, CredTran.Amount, ;
CredTran.Outstandng, TotAuthAmt, PromptTerm, CredTran.Paid,
CredTran.TaxAmount, ;
00000.00 as DisAmount, 000000000.00 as AmtToPay, ;
00000000.00 as Pay, "Chq" as cPayType, ;
count(1) as LineCount ;
from CredTran inner join Creditor ;
on CredTran.AddrRecID = Creditor.AddrRecID ;
inner join TranLine ;
on TranLine.CrTranID = CredTran.CrTranID ;
where PayBy <= pdPayToDate .and. CredTran.Outstandng > 0 ;
and TotAuthAmt > 0 and TotAuthAmt <> CredTran.Paid ;
and OK2Alloc({}, CredTran.Outstandng, .T., CredTran.TranType,
CredTran.Status, .T.) ;
group by CredTran.CrTranID ;
order by PayBy ;
into table (lcFileName)
Grant