0
I am performing a query through a value stored in a variable. This variable is declared DECLARE @it_codigo varchar(max)
and gets value from a field ntext
from another table, through a previous.
SELECT * FROM anaProdutos WHERE cod_produto LIKE '' + @it_codigo + ''
I also tried to use the function QUOTENAMES
and still not inserting the apostrophes.