Reputation: 486
I want to create a parameterized query in which one of the parameters is an array/list. For example:
var query = @"
SELECT
doctype1.user_id
FROM bucket doctype1
JOIN bucket doctype2
ON doctype2.user_id = doctype1.user_id
AND doctype2.type = ‘doctype2’
AND doctype2.value.Value IN [$myset]
WHERE doctype1.type = ‘doctype1’
AND doctype1.value.Type = $type
ORDER BY doctype1.user_id
LIMIT 2
OFFSET 0";
I've tried things like doing:
None of which are working
Upvotes: 1
Views: 414
Reputation: 486
I feel a bit dense but this was the solution for anyone else running into this issue:
I changed my initial string query and removed the square brackets to look like this:
AND doctype2.value.Value IN $myset
Then I was able to use either
Hope this helps someone else!
Upvotes: 2