Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
NetSuite has launched SuiteSuccess Wholesale Distribution Edition, in Japan. Please join us the webinar on February 12 that introduces NetSuite solution with demos and case studies for Wholesale Industry.
Register Now
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,