Does there have to be one createparameter per variable

48 views Asked by At

I have a SQL statement that has a variable in it that is used twice because of an or in the statement. The question is when I create a CreateParameter statement for the var, do I need 2 statements one for each variable or can I use the same CreateParameter statement for both of the variable because they are the same value.

Select something 
From table
Where field1 = var 
  And field2 = 'test' Or field1 = var 
  And field2 = 'test2'
0

There are 0 answers