I need a little help on a query that seems basic to me. But I’m stuck.
Thanks to you !
I would like to make a simple n1ql query that uses a variable. The idea will be to be able to put my variable in a query chain in order to quickly check the quality of my data.
Query :
declare $a=“actionType”;
select * from cemo where table = $a ;
This returns an error to me. I don’t know how to declare or set my variable called a.
Otherwise I suspect what you’re really looking to do is use a parameterised query in your client - prepare the statement and execute it using the parameters defined:
I had seen in the documentations the Positional Parameters and Named Parameters but it was using the curl command. But now, I make the link with the documentation I read ;-).