0

When I run this query in the Query Explorer…

Select quote from sqs quote
join product in quote.QuotedProductList 
join part in product.PartNumberList 
WHERE part.id = 'Part-XXXX-XX' AND quote.QuoteStatus = 'Draft'

..in DocumentDB I get two quotes with the appropriate product and part data showing in the results pane; this is correct. But, when I create the same query in C# I get two quote objects returned that have been created by the constructor but there is no data from the database…

List<Quote> hits = new List<Quote>();
            string sql = "Select quote from sqs quote join product in quote.QuotedProductList join part in product.PartNumberList WHERE part.id = '" + partNumber + "' AND quote.QuoteStatus = 'Draft'";
hits = Client.CreateDocumentQuery<Quote>(Collection.DocumentsLink, sql).ToList();

Can anyone explain why this happening?

1 Answer 1

1

Try this

Select quote.quote from sqs quote join product in quote.QuotedProductList join part in product.PartNumberList WHERE part.id = '" + partNumber + "' AND quote.QuoteStatus = 'Draft'";

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.