Чтение между строк, но я подозреваю , что вы на самом деле хотите:
CREATE PROC dbo.ManualParse2 @ColumnName sysname, @ColumnValue nvarchar(50) AS --You aren't going to have a department with 1 billion characters in it
--sysname is the correct data type for object names (it's a synonym for nvarchar(128) NOT NULL)
BEGIN
DECLARE @SQL nvarchar(MAX),
@CRLF nchar(2) = NCHAR(13) + NCHAR(10);
SET @SQL = N'SELECT *' + @CRLF + --This should reallty be a column list
N'FROM dbo.Faculty' + @CRLF +
N'WHERE ' + QUOTENAME(@ColumnName) + N' = @ColumnValue;';
--PRINT @SQL; --Unlikely to be needed for such a simple statement, but your debugging friend
EXEC sp_executesql @SQL, N'@ColumnValue nvarchar(50)', @ColumnValue;
END;
GO