How to Pass variable to sql execute query?

I realized my earlier answer is different based on the type of database/connection. My earlier answer with the ‘?’ was for an ODBC connection. For SQL you do use the usual ‘@argument’ in your statement.

Do you have var1 in the input paramaters? Make sure you have var1 in there and no misspellings (I believe it is case sensitive, but can’t remember).

Then type in “select column1, column2 FROM table where column1 in @var1

If that still isn’t working, try this instead: “select column1, column2 FROM table where column1 in ?”