Hi All, I'm trying to convert the below SQL query(...
# suiteql
v
Hi All, I'm trying to convert the below SQL query(which is using in the JDBC suiteconnect) to the suiteQl but facing some issues which is the query uses the Transaction_Inventory_Numbers table for joins but unfortunately the table is only available to access in the connect browser but I couldn't see It in the Record browser. Is there any way that It can be converted into the suiteQl query?
select
tl.LOCATION_ID LOCATION_ID,
L.NAME LOCATION_NAME,
tl.ITEM_ID ITEM_ID,
tino.INVENTORY_NUMBER INVENTORY_NUMBER,
SUM(NVL(tl.AMOUNT,0)) AMOUNT,
SUM(NVL(tl.PKGS,0) *  SIGN(NVL(tl.ITEM_COUNT,0)) ) ITEM_PKGS,
SUM(NVL(tl.ITEM_COUNT,0)) ITEM_COUNT
from
transactions t,
transaction_lines tl
left outer join
transaction_inventory_numbers tino on (tl.TRANSACTION_ID = tino.TRANSACTION_ID and tl.TRANSACTION_LINE_ID = tino.TRANSACTION_LINE)
left outer join
locations l on (tl.LOCATION_ID = l.LOCATION_ID)
where
t.TRANDATE <= ? and
t.memorized = 'No' AND
t.TRANSACTION_ID = tl.TRANSACTION_ID and
tl.NON_POSTING_LINE = 'No' AND
tl.IS_COST_LINE = 'No' AND
tl.ACCOUNT_ID = 128 and
tl.ITEM_ID IS NOT NULL
group by
tl.LOCATION_ID,
L.NAME,
tl.ITEM_ID,
tino.INVENTORY_NUMBER
order by LOCATION_NAME, INVENTORY_NUMBER
Any alternative solution for the below Joining condition?
left outer join
transaction_inventory_numbers tino on (tl.TRANSACTION_ID = tino.TRANSACTION_ID and tl.TRANSACTION_LINE_ID = tino.TRANSACTION_LINE)