Value of SQLITE Sum Is TWideStringField?
Posted: Mon 04 Apr 2011 03:48
I have 2 tables,it is master-detail Relation,they have a Float Field( Name is AMT,meaning is Amount ).
for example,the Sql is
select A.*, iFNull( (Select Sum(B.AMT) from F_LoanSub B Where B.LoanID = A.ID),0.00) As AMT2 from F_Loan A
Whether or not Using "IFNULL", "AM2 " Field In The UniQuery Is TWideStringField. If Table F_LoanSubSo Have No Data To Match Master Table ,It raise Error "
qryBase:Type Missing for Field "AMT2",expecting: Widestring actual: Float ".
I try modify SQL for Cast AM2 Field to Real,BUT IT Still error!
how to solve this problem? Thanks!
develop environment:
delphi xe+unidac(3.60.0.16)+sqlite expert,AMT Field is Float Type!
for example,the Sql is
select A.*, iFNull( (Select Sum(B.AMT) from F_LoanSub B Where B.LoanID = A.ID),0.00) As AMT2 from F_Loan A
Whether or not Using "IFNULL", "AM2 " Field In The UniQuery Is TWideStringField. If Table F_LoanSubSo Have No Data To Match Master Table ,It raise Error "
qryBase:Type Missing for Field "AMT2",expecting: Widestring actual: Float ".
I try modify SQL for Cast AM2 Field to Real,BUT IT Still error!
how to solve this problem? Thanks!
develop environment:
delphi xe+unidac(3.60.0.16)+sqlite expert,AMT Field is Float Type!