"Could not find stored procedure error" 每镁 "

I am trying to execute a query after reading content from a SQL Script file, assigning it to a variable, and then executing the content. Then I get this error saying Could not find stored procedure '每镁'

. Please help me to understand this issue. Thank.

Information:

SQL Server 2014

SSMS version - 12.0.4100.1

+3


source to share


1 answer


每镁

is one way to interpret two bytes of a UTF-16 byte byte which is \ xFF and \ xFE.

You get those two letters when you read a file that was saved in UTF-16 encoding with a tool that doesn't know, or, more likely, hasn't been configured to use-Unicode.

For example, when you edit a text file with Windows Notepad and select "Unicode" as the file encoding when saving it, Notepad will use UTF-16 to save the file and mark it with the specified two bytes at the beginning.



If any thing you are using to read the file does not know that the file is Unicode, then it will use your computer's default byte-encoding to decode that text file.

Now, if this default encoding is Windows-1252 , then as in your case, then 每镁

this is what you get because there \ xFF is there

and \ xFE is

.

Therefore, when presented, 每镁

SQL Server thinks that it should be the name of the stored procedure because stored procedures are the only statements you can run with just your name. And he dutifully reports that he cannot find a procedure for this name.

+8


source







All Articles