Site icon Database Tutorials

Procedure expects parameter ‘@statement’ of type ‘ntext/nchar/nvarchar’

 

ERROR MESAGGE:

“Procedure expects parameter ‘@statement’ of type ‘ntext/nchar/nvarchar’.”

EXPLANATION:

You may see this error message when you run the command in a variable with the sp_executesql system SP.

Example:

Or if you run a command directly without using any variables, you will see the same error message:

SOLUTION:

In fact, the error is clearly written in the error message. The @statement parameter that you will use for the sp_executesql system SP should be UNICODE.

The correct versions of the above examples are as follows:

and

Exit mobile version