Where Specialty = '502' or Specialty = @SpecifiedSpecialty
I am trying to make this query dynamic by using a parameter.
For example @SpecifiedSpecialty might equal
'503' OR Specialty = 138
Thereby making the total query
Where Specialty = '502' or Specialty = '130' OR Specialty = 138
However, when I run sql profiler to what is actually being passed to the query I get
'502 or Specialty = 130'
Here is my c# code which sets the parameter values.
Session["specialty_multiselect"] = Session["specialty_multiselect"].ToString() + " or Specialty = " + itemValue + "'";