Hi
I have an SP which concatenates 2 columns in a where clause - ie WHERE [Column1] + [Column2] = @var. This, as far as i'm aware, is not going to access any seek on an index on a table.
My task is to create an index on this table and get the SP to access said index.
Aside from combining the two columns into one column on the table, are there any suggestions on how I can get an SP to access the newly created index when queried by the SP?
One thought of mine is to firstly index Column1 and allow the SP to access this index by inserting the rows into a temp table. Then a search on the temp table to retrieve the records on a search on Column2.
Any other way of facilitating this do you guys think?
Thanks.