To execute query using query engine,which contains like

Hi -

I am trying to run this query using query engine. META is having values like 23:34AB

query <- ‘select meta().id from dummyone WHERE META().id LIKE “%AB” order by META().id limit 10;’

This one returning 1050 No statement or prepared value when trying to execute from R,while other queries are working .
This is the R call.
req <- httr::POST(cbServer, httr::add_headers(“Content-Type” = “application/x-www-form-urlencoded;charset=UTF-8”),
body = paste(“statement=”, query, “&creds=”, creds));

Try one of this

query <- "select meta().id from dummyone WHERE META().id LIKE '%AB' order by META().id limit 10;"
query <- "select meta().id from dummyone WHERE META().id LIKE \"%AB\" order by META().id limit 10;"

In URL '% 'is escape  so replace it with '%25'
query <- 'select meta().id from dummyone WHERE META().id LIKE "%25AB" order by META().id limit 10;'

Did you try “Content-Type: application/json” . You are string has % and may be it confusing with url encoded escape character %

1 Like

%25AB worked . thanks a lot …