Is this not valid? SELECT * FROM transaction INNER...
# suiteql
n
Is this not valid? SELECT * FROM transaction INNERJOIN transactionLine ON transaction.id = transactionLine.id WHERE type = 'SalesOrd' ?
m
INNER JOIN is supposed to be separed
s
The ON part needs to link the transaction id, not the transactionline id.
ie ON transaction.id = transactionline.transactionid
Can't check the exact field name
c
transactionline.transaction
👍 1
n
SELECT * FROM transaction INNERJOIN transactionLine ON transaction.id = transactionLine.transaction Still throwing error. @Clay Roper @Stuart Anderton
It worked! Thanks @Clay Roper @Marcos Vinicios de Carvalho @Stuart Anderton But I don't see any lines data.
m
Copy code
SELECT
  transaction.id,
  transactionLine.id as lineId,
FROM
  transaction
  INNER JOIN transactionLine ON transaction.id = transactionLine.transaction
WHERE
  type = 'SalesOrd'
that worked for me. are you sure there are sales orders?
n
Hi @Matt Bernstein yes there are sales order. Lines data is showing up as a separate result. I was trying to find it within the transaction result.
m
could you clarify by “I was trying to find it within the transaction result”?
n
I was assuming there will be "items" array within the sales order object. but it appears as a separate object in the result array.
m
yes, each line will be it’s own row. You can then group them in JS. It makes it much easier to be able to query transaction lines directly
n
Yes, I can group them in JS. Thank you.