2016-08-03 11 views
0

N1qlを使用してバケット内の文書全体を取得したい 私の文書名はCR_5031_114156723_2016-08-02です。他のCR番号は文書ごとに異なります。文書全体を取得したい

I tried with below 2 query but getting only OrderDetails details 
select d.* from Delivery.OrderDetails d where d.orderId in ['114156723'] 

select d.*,Delivery.OrderLines from Delivery.OrderDetails d where d.orderId in ['114156723'] 

Delivery is my bucket Name 

Below is the document 
Please help me in writing a query to get entire document 

{ 
"OrderDetails": { 
"orderId": "114156737", 
"vanNumber": "5J", 
"voucherPromotionName": "Computers for Schools", 
"customerNumber": "85516242", 
"shortOrderNumber": "4692", 
"VoucherName": "Clubcard Voucher" 
}, 
"OrderLines": { 
"Product": [ 
{ 
"isApplicableForVat": "N", 
"productQuantity": "6", 
"productId": "52599951", 
"productDescription": "Ni Pstrd S/Skimmed Milk 3ltr " 
}, 
{ 
"isApplicableForVat": "Y", 
"productQuantity": "1", 
"productId": "55771771", 
"productDescription": "Dale Farm Vanilla Ice Cream 1ltr *" 
} 
] 
}, 
"DeliveryDetails": { 
"deliverySlotStartTime": "20:00", 
"deliverySlotEndTime": "21:00" 
}, 
"ECoupons": { 
"coupon": "0.0000" 
}, 
"_class": "com.model.CustomerReceipt", 
"OutOfStockProducts": {}, 

} 

私は、以下の2クエリを試みたが、唯一たOrderDetailsを得ることが セレクトDを詳しく説明しています。* Delivery.OrderDetailsからは、Dどこd.orderIdで[ '114156723']

select d.*,Delivery.OrderLines from Delivery.OrderDetails d where d.orderId in ['114156723'] 

Delivery is my bucket Name 

おかげ

答えて

1

からdを選択してください。d [OddderDetails.orderId in ['114156723']

関連する問題