Query IN operator ERROR

I can’t get the ‘in’ condition to work in a query. I tried it in both PHP and ASP.NET and both are producing errors when I try to open it in a browser.

Here is my query:

This is the error from an ASP.NET project:

Here is the error from a PHP project:

I should mention that I can run the query directly in SSMS and it works fine.

The in operator expects an array, not a string

OK, thanks for that, @Teodor! Wasn’t sure how to get the array from a single column in the previous query, but figured it out.

Is this the right way to do it? I have a query that queries the Orders table, and then one that queries the Order Details table. The condition on the Order Details query is where all the OrderID’s equal the first query OrderID column.

So, in the query builder for the Order Details table, this is my condition:

In the dynamic builder, select the first query data property and join it with a comma on the OrderID column, and then split it on the comma to create the array:
image

Or, is there a better way?