SQL JOINS

Dinesh shared this question 24 days ago
Answered

I get Syntax error when I try to use JOIN -

select * from orders join inventory on orders._id = inventory.fields.orderid

The error seems to say that I can't use two periods on the tables, as in I can't use inventory.fields.orderid in the above example. Can you please clarify?

Comments (1)

photo
1

Please double quotes the embedded field. inventory.fields.orderid -> "inventory.fields.orderid"

select * from orders join inventory on "orders._id" = "inventory.fields.orderid"