SQL JOINS

Dinesh shared this question 4 years 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?

Replies (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"

Leave a Comment
 
Attach a file