I have below sql where I am trying to pass name parameter to sql, how can i append, I am getting syntax errors..
I have to @name in place of steeve
if @name not null BEGIN
set @sql = @sql + ' AND name=''steeve''';
END
if @name is not null then
BEGIN
set @sql = @sql + ' AND name=''' + @name + '''';
END