fong W4686

Member since: Friday, 27 March 2015
Last login: 4 days ago
Profile viewed: 96 views

Your Rank: 93
Points: 2

fong W4686 created a new topic ' The ClientDataSet lost data?' in the forum. 2 years ago

I use this SQL select data from sql sever 2008:

select Patient.PatientID, MAX(Cash.CashID)as MaxID, SUM(Cash.Amount) as Balance
from Patient left join Cash
On Patient.PatientID=Cash.PatientID
group by Patient.PatientID

when used in FDQuery with local database, it's run correct. when used in DataSnap with FDQuery In server and ClientDataSet in Client , only the maxid field is correct , the balance field is alway be zero .
I see the type of the balance field is FMTBCD(38,2), so I change the type of amount field from numberic(9,2) to money, this SQL can run correct. is that a bug?