问题
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?
回答1:
What you want is:
SELECT VALUE food FROM food JOIN t in food.tags WHERE t.name = "oil"
来源:https://stackoverflow.com/questions/41072638/select-is-only-valid-with-a-single-input-set