Reputation: 119
Question: What is the proper syntax for querying a COSMOS DB using the SQL API when dashes are used in the property name?
Error: Failed to query item for container appointment: {"code":400,"body":{"code":"BadRequest","message":"Gateway Failed to Retrieve Query Plan: Message: {"errors":[{"severity":"Error","location":{"start":7,"end":8},"code":"SC1001","message":"Syntax error, incorrect syntax near
This query works SELECT a.ID FROM accesspoint a
This query fails SELECT a.Point-Name FROM accesspoint a
What I've tried: I tried wrapping the value in double quotes, single quotes, (), <> Could not find any documentation on the use of dashes in the name
Upvotes: 2
Views: 1848
Reputation: 119
[] and quotes
SELECT * FROM c where c["point-name"] = "Eastern Standard Time"
Thank you Bill
Upvotes: 7