Hi,
I have a statement that does not work as expected:
changecompany( "SAM" )
{
while select sum( DebitMST ), sum ( CreditMST ), TransDate, AccountNum, PeriodCode
from ledgerBalancesDim
group by ledgerBalancesDim.TransDate
where ledgerBalancesDim.AccountNum == "777777" &&
ledgerBalancesDim.PeriodCode == PeriodCode::Regular &&
( ledgerBalancesDim.TransDate >= mkdate( 01,01,2014 ) && ledgerBalancesDim.TransDate <= mkdate( 31,12,2014 ))
{
Do my thing
}
}
I need to go through records in the view "LedgerBalancesDim" that grouped by date and get the sum of "DebitMST" and "CreditMST".
But the result set limits only to the requirement:
ledgerBalancesDim.TransDate >= mkdate( 01,01,2014 ) && ledgerBalancesDim.TransDate <= mkdate( 31,12,2014 )
and not to the AccountNum and PeriodCode.
What is wrong with the query?
*This post is locked for comments
I have the same question (0)