From: Justin D. on
Hi,
I am not sure what is the issue.
I got following error.
"Incorrect syntax near '@Param'."

Bottom is the stored procedure.
---------------------------------------------------------
CREATE PROC [dbo].[spCreateUser]
@Param nvarchar(50)
AS
BEGIN
CREATE USER @Param FOR LOGIN @Param
END
---------------------------------------------------------
I would appreciate if you let me know.
Thanks.
From: Plamen Ratchev on
You cannot use parameters/variables in the CREATE USER statement. To accomplish that you would need to use dynamic SQL.

--
Plamen Ratchev
http://www.SQLStudio.com