I am working with a Stored Proc with takes several parameters. It turns out, though, that for one of the params, I need to loop through a list of items and call the SP multiple times. But as I pass the SP every possible value of that type, it would seem more efficient (and simpler) to just bypass the parameter by saying "get them all" by means of a wildcard.
Is it possible to do that, such as with a "*" or a "%" or something?
Theoretically (based on the research I've done), "%" should work, but in my case it's not returning any records. Am I doing something wrong, with this code:
. . .
new SqlParameter()
{
ParameterName = "@Member",
SqlDbType = SqlDbType.VarChar,
Value = '%'
},
. . .
?