I am getting incorrect results from my query.
If I write the query like this I get too many results:
If I write the query like this I get the correct results:
....I am using SQLServer 2005.
Anyone have an answer as to why?
Sera
If I write the query like this I get too many results:
Code:
set @var = 'matchstring'
select * from table where aval Like @var + '%'
If I write the query like this I get the correct results:
Code:
select * from table where aval Like 'matchstring%'
Anyone have an answer as to why?
Sera