Reputation: 21
I can not get the Body to return results when using a where clause. It doesn't seem to like the values for f.RequestPath.
{
"query": "SELECT * FROM AppLogs f WHERE f.RequestPath in ("/payments/post-sales", "/payments/pre-sales", "/payments/refunds", "/payments", "/Payments")"
}
The Query works when just do this. I think it might have something to do with the slashes in the Requestpath values but don't know how to resolve that. Do you need to use escape characters? How would you do that? Any help would be appreciated.
{
"query": "SELECT * FROM AppLogs f WHERE 1=1"
}
Upvotes: 1
Views: 119
Reputation: 136334
Please try by replacing double quotes in your query with single quotes. Something like:
{
"query": "SELECT * FROM AppLogs f WHERE f.RequestPath in ('/payments/post-sales', '/payments/pre-sales', '/payments/refunds', '/payments', '/Payments')"
}
UPDATE
As mentioned by @MatiasQuaranta in the comments, you can also escape the double quotes in you query by doing something like:
"query": "SELECT * FROM AppLogs f WHERE f.RequestPath in (\"/payments/post-sales\", \"/payments/pre-sales\", \"/payments/refunds\", \"/payments\", \"/Payments\")"
Upvotes: 2