I'm getting all records returned with this:
declare @strexec nvarchar(800), @strsearch nvarchar(80)
set @strsearch = N'%law%'
set @strexec = N'SELECT TitleID,title FROM Titles where title like @strsearch$'
execute sp_executesql @strexec, N'@strsearch$ nvarchar' , @strsearch$ = @strsearch
any ideas?
declare @strexec nvarchar(800), @strsearch nvarchar(80)
set @strsearch = N'%law%'
set @strexec = N'SELECT TitleID,title FROM Titles where title like @strsearch$'
execute sp_executesql @strexec, N'@strsearch$ nvarchar' , @strsearch$ = @strsearch
any ideas?