static void CustOpenTrans(Args _args)
{
CustTrans custtrans;
CustTable custtbl;
while select custtbl
{
select sum(AmountMST) from custtrans where custtrans.AccountNum == custtbl.AccountNum;
info(strFmt("Customer - %1 Amount - %2",custtbl.AccountNum,custtrans.AmountMST));
} }
Hi Rajendra, I want to find find the name of customers with the total transaction amount less then a specific amount for instance amount less the 10000 how should I modify this query to suit my requirement. Can you please help ?
ReplyDeleteThanks for viewing my blog !!!!
Deletejust add
select sum(AmountMST) from custtrans where CustTrans.AmountMST < 10000 && custtrans.AccountNum == custtbl.AccountNum
This may helpful for you
Hey thanks for replying I tried this earlier as well but it gives negative values as well. Can we do it only using CustTrans and also remove negative values without using if clause ?
DeleteHii Pranay
Deletetry this once
select sum(AmountMST) from custtrans where CustTrans.AmountMST > 0
&& CustTrans.AmountMST <10000 && custtrans.AccountNum == custtbl.AccountNum ;
This comment has been removed by the author.
ReplyDeletewho to print the sum of amount for each accountnum from CustTrans
ReplyDelete