How can I use SQL to find results with a dynamic integer field?

15 views Asked by At

| ID | Status |

I am searching a table with a status field that is an integer. I need to find certain values with the dynamic status. The status can be 0 or 0,1 or 1,3 or 0,1,3 etc. I get an error message when trying to use IN.

The status value is an integer type value.

Select *
From FinancialScheduledTransaction
Where Status IN (@Status)

Error Message: Query Error! Conversion failed when converting the nvarchar value '0,1' to data type int.

0

There are 0 answers