Hi
We are trying to get paid checks from BankChequeTable with null cleared date from BankAccountTrans Table.
When we run the below Sql query in database its returning some 3000 records.
select C.CHEQUENUM, C.CHEQUESTATUS , C.TRANSDATE , C.ACCOUNTID, C.AMOUNTCUR , C.BANKNEGINSTRECIPIENTNAME , C.VOUCHER,
C.PROCESSEDBYPOSITIVEPAY, C.CREATEDDATETIME, C.MODIFIEDDATETIME,T.CLEAREDDATE
from dbo.BANKCHEQUETABLE C LEFT JOIN dbo.BANKACCOUNTTRANS T ON C.ACCOUNTID = T.ACCOUNTID AND c.CHEQUENUM = T.CHEQUENUM
WHERE
C.CHEQUESTATUS = 4 and t.CLEAREDDATE is null
When we run below similar AX query in its returning more than 100k records.
select count(ChequeNum) from chequeTable
where chequeTable.ChequeStatus == ChequeStatus::Payment
outer join cleareddate from bankAccountTrans
where bankAccountTrans.ChequeNum == chequeTable.ChequeNum
&& bankAccountTrans.AccountId == chequeTable.AccountID
&& bankAccountTrans.ClearedDate == dateNull();
3000 records returned by SQL query are the results we are expecting.
What could be the possible reason for returning different number of records. Am I missing something here?
Please suggest.
Thanks
Siva