Dylan Mann
03/21/2024, 11:39 PMrunSuiteQLPaged
returning duplicate records? Changing the pageSize
causes the duplicate rows to go away, but this seems like a fragile solution without knowing the root cause.Dylan Mann
03/21/2024, 11:42 PMSELECT
txn.id as id,
FROM transaction AS txn
JOIN transactionline txn_line
ON (txn_line.transaction = txn.id)
JOIN transactionaccountingline as txn_acc_line
ON (
txn_acc_line.transactionline = txn_line.id
and txn_acc_line.transaction = txn.id
)
JOIN account
ON (txn_acc_line.account = account.id)
WHERE
txn.trandate >= TO_DATE('2022-01-01', 'YYYY-MM-DD')
and txn.trandate <= TO_DATE('2024-05-01', 'YYYY-MM-DD')
and account.accttype = 'CredCard'
and MOD(txn.id, 2) = 0
Here's the query that's returning duplicates for what it's worthShai Coleman
03/22/2024, 1:48 AMORDER BY txn.id
and see if it helps.
Best practice is to paginate by the last result, e.g. if the last ID was 12345, you'd add WHERE txn.id > 12345 ORDER BY txn.id
to get the next page.Shawn Talbert
03/29/2024, 3:18 AM