{"id":3393,"date":"2015-12-16T09:47:27","date_gmt":"2015-12-16T14:47:27","guid":{"rendered":"https:\/\/academy.sqlbak.com\/?p=3393"},"modified":"2023-10-17T05:13:50","modified_gmt":"2023-10-17T09:13:50","slug":"unclosed-quotation-mark-after-the-character-stringmsg-105","status":"publish","type":"post","link":"https:\/\/academy.sqlbak.com\/unclosed-quotation-mark-after-the-character-stringmsg-105\/","title":{"rendered":"Unclosed quotation mark after the character string (Msg 105)"},"content":{"rendered":"
The following\u00a0error “Unclosed quotation mark after the character string…<\/em>” occurs\u00a0when you miss a quotation mark.<\/p>\n When the single quote is used once, and to close the statement SQL Server is expecting another single quote. For some reason, a user can forget to do it. For example:<\/p>\n <\/p>\n In this case, SQL Server will send the following error message:<\/p>\n Also, assume that the statement has been copied from an MS Word document or website to SSMS and the “Unclosed quotation mark after the character string…” <\/em>error appears. This happened because a single quote in MS Word or website ( \u2018 ) is different from a single quote in SSMS ( ‘ ).<\/p>\n To fix this error just put another single quote at the beginning or at the end of the statement where it is needed:<\/p>\n The following\u00a0error “Unclosed quotation mark after the character string…” occurs\u00a0when you miss a quotation mark. When the single quote is used once, and to close the statement SQL Server is expecting another single quote. For some reason, a user can forget to do it. For example: BACKUP DATABASE Adventureworks TO DISK = ‘diff.bak<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[159],"tags":[],"yoast_head":"\nBACKUP DATABASE <\/span>Adventureworks TO DISK<\/span> = 'diff.bak<\/span><\/pre>\n
Msg 105, Level 15, State 1, Line 1<\/span>\r\nUnclosed quotation mark after the character string 'diff.bak<\/span>'. \u00a0<\/span><\/pre>\n
BACKUP DATABASE <\/span>Adventureworks TO DISK<\/span> = 'diff.bak'\r\n<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"