Discussions
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Join us
SuiteQL odbc query summing consolidated amounts
I'm trying to sum amounts in two currencies.
This query works
SELECT -- 68,334
tr.ID AS ID,
TransactionAccountingLine.netamount,
TransactionAccountingLine.amount AS amount, -- for sum
BUILTIN.CURRENCY_CONVERT(transactionLine.foreignamount), -- for sum
TO_NUMBER(BUILTIN.CURRENCY_CONVERT(transactionLine.foreignamount)), -- for sum
--TO_BINARY_FLOAT(TO_NUMBER(CURRENCY_CONVERT(TransactionAccountingLine.amount))) as A_EUR, -- for sum
(TO_NUMBER(BUILTIN.CONSOLIDATE(TransactionAccountingLine.netamount, 'LEDGER', 'DEFAULT', 'DEFAULT', 1, 252, 'DEFAULT'))) as A_eur,
tr.trandisplayname AS trandisplayname,
tr.trandate AS trandate,
accountingPeriod.periodname,
accountingPeriod.enddate,
tr.TYPE AS transcation_type,
account.custrecord1400 as account_type_order,
account.accttype as account_type,