I observed that we cannot write a UPDATE query on a container like SELECT on a query editor in the azure portal. I want to right a reusable code that can be used to reset my document data.
Could one please let me know if writing a stored procedure is the right approach to achieve this.
I'm trying to update a document say,
{ "partitionKey": "98776632-34er-ii76-318a-9876543456ae", "customer": { "firstName": "UserFirstName", "lastName": "UserLastName", "email": "user@gmail.com", "password": "#4Ftyer%4s" }, "balance": 400 }
Update c
SET c.balance = 0, c.customer.password="ResetPasswordValue"
Where c.partitionKey = "98776632-34er-ii76-318a-9876543456ae"
- This doesn't work from a query editor, as update queries are not allowed
Could one please let me know how to get this implement using a stored procedure. Thank you