【发布时间】:2019-10-17 00:58:46
【问题描述】:
我在同一个 cosmos 集合中有两个 JSON 文档
JSON 1:
{
"source": "PlacedOrder"
"orderid":12345
"customerName":xxxx
}
JSON 2:
{
"orderid": "70029955",
"source": "ValidationFailure",
"_ts":1570804414
}
我尝试了以下查询,但没有得到结果
select c.orderid,c.customerName
from c
JOIN (select value t from t in c.orderid where t.source='ValidationFailure' and t._ts=1570804414)
WHERE c.source='PlacedOrder'
如何根据 JSON 2 中的订单 ID 从 JSON 1 中获取客户名称?
【问题讨论】:
标签: azure azure-cosmosdb