Hi.
I have 2 Linked Data Tables and I want to do a Left Join query like:
SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
LEFT JOIN Orders
ON Customers.CustomerID=Orders.CustomerID;
I should use app_tables.Customers.search and app_tables.Customers.get I suppose but I could’nt let it work and did not find anything in the Forum.
Thank you for your help.
Anvil’s data tables are not relational tables, so they don’t have the equivalent of an inner join. Instead, just query your Orders table (assuming that it has a link back to the Customers table). Each Orders row will contain the entire linked Customers row.
For example, order['customer']['name']
would go through the linked field named customer
and get the name
field from the linked customer row.
1 Like