SELECT t.id AS transaction_id, t.tranid AS tra...
# suiteql
k
SELECT t.id AS transaction_id, t.tranid AS transaction_number, t.trandate AS transaction_date, t.class AS sales_channel FROM transaction t WHERE t.type = 'CashSale' AND t.status != 'Voided' AND t.tranid IS NOT NULL ORDER BY t.trandate DESC FETCH FIRST 100 ROWS ONLY; im getting class not found, can someone help me? How i can get the selected class on transaction?
e
I think all the classifiers (subsidiary, department, location, class) are at the
transactionline
level, not
transaction
k
Thank you, i don't see any information on suiteql table referencfe about transactionline. I was able to make a query results from it, however what are the keys i need to join transaction and transactionline?
e
Copy code
transaction.id = transactionline.transaction
k
Thank you, that helped and it worked
r
Quick note that your Voided status AND clause likely isn't doing anything. The status values in the tables are single letters. So like Voided might be represented by 'V' for instance.