Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello..
i have a problem with this, again..
in sql i do this :
SELECT SUM(coraccountdetail.payment) as sum_payment
FROM coraccount,coraccountdetail,corpayment
WHERE coraccount.norek = coraccountdetail.norek
AND coraccount.nopin = coraccountdetail.nopin
and coraccountdetail.nopin=corpayment.nopin
and coraccountdetail.norek=corpayment.norek
and corpayment.paymentid = coraccountdetail.paymentid_CAD
and coraccount.closetype = 0
and the result is :
sum_payment : 11275726357
when i try on qlikview with this syntax :
sum(if(closetype_CA=0 and PaymentId=paymentidpokok_CAD ,payment_CP))
and the result is :
sum_payment : 11678026889
on qlikview,
table coraccount and coraccountdetail is connected by nopin_CA and norek_CA
table coraccountdetail and corpaymen is connected by nopin_CAD and norek_CAD
and why the result is different?
many thx...
pls use Trim() in If condition . and also chaeck whether link is proper between
table coraccount and coraccountdetail is connected by nopin_CA and norek_CA ,
and
table coraccountdetail and corpaymen is connected by nopin_CAD and norek_CAD
or not.
I think there is problem in link between table or linking key is not proper.
Regards
Sunil Jain.
@Sunil
hello Sunil..
i've tried :
-sum(trim(if(closetype_CA=0 and PaymentId=paymentidpokok_CAD ,payment_CP)))
-sum(if(closetype_CA=0 and PaymentId=paymentidpokok_CAD ,trim(payment_CP)))
-sum(if(trim(closetype_CA=0 and PaymentId=paymentidpokok_CAD) ,payment_CP))
-sum(if(trim(closetype_CA=0) and PaymentId=paymentidpokok_CAD ,payment_CP))
-sum(if(closetype_CA=0 and trim(PaymentId=paymentidpokok_CAD) ,payment_CP))
but nothing's change..
😞
are idem paymentidpokok_CAD (Qlikview) & paymentid_CAD (sql) ?