Trying to learn the query syntax in the sandbox ( https://www.documentdb.com/sql/demo )
SELECT food.id FROM food JOIN t in food.tags WHERE t.name = "oil"
This works, but what if I want to get the entire document, so I tried
SELECT food.* FROM food JOIN t in food.tags WHERE t.name = "oil"
and
SELECT * FROM food JOIN t in food.tags WHERE t.name = "oil"
and get the error:
{
"errors": [
{
"severity": "Error",
"location": {
"start": 7,
"end": 8
},
"code": "SC2040",
"message": "'SELECT *' is only valid with a single input set."
}
]
}
How does one get the entire document back?
What you want is:
SELECT VALUE food FROM food JOIN t in food.tags WHERE t.name = "oil"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With