Could someone please help, I have been trying to spot the problem but I cant seem to see the problem.
Code:
CREATE PROCEDURE [dbo].[spSearchComm] @project as varchar(50), @search as varchar(255)
AS
declare @strQuery varchar(8000)
declare @strOrig varchar(3)
set @strOrig = Yes
set @strQuery = SELECT * FROM commentsTbl WHERE projName= + @project + and original= + @strOrig + and commtitle like + @search + or commDesc like + @search + or commAction like + @search
exec (@strQuery)
GO
[code]
It is giving the following error but I everything things to be fine:
Incorrect syntax near the keyword or
Thanks
Simon