G
Guest
I'm trying to use a SqlParameter for the IN operator in a T-SQL statement:
myCommand.CommandText = "SELECT CustomerID, CustomerName FROM Customers
WHERE AccountNumber IN (@accountNumbers)";
The problem I am having is that I can't figure out what to assign
@accountNumbers to:
SqlParameter param = myCommand.Parameters.Add("@accountNumbers",
SqlDbType.VarChar);
param.Value = ???
Any advice???
Thanks,
Nate
myCommand.CommandText = "SELECT CustomerID, CustomerName FROM Customers
WHERE AccountNumber IN (@accountNumbers)";
The problem I am having is that I can't figure out what to assign
@accountNumbers to:
SqlParameter param = myCommand.Parameters.Add("@accountNumbers",
SqlDbType.VarChar);
param.Value = ???
Any advice???
Thanks,
Nate