{"id":3389,"date":"2015-12-16T09:45:48","date_gmt":"2015-12-16T14:45:48","guid":{"rendered":"https:\/\/academy.sqlbak.com\/?p=3389"},"modified":"2023-10-17T05:14:50","modified_gmt":"2023-10-17T09:14:50","slug":"incorrect-syntax-near-msg-102","status":"publish","type":"post","link":"https:\/\/academy.sqlbak.com\/incorrect-syntax-near-msg-102\/","title":{"rendered":"Incorrect syntax near (Msg 102)"},"content":{"rendered":"
The “Incorrect syntax near…<\/em>” error appears if some\u00a0symbol is missed. For example, the user decided\u00a0to make a full database backup with the following command:<\/p>\n <\/p>\n Of course, an experienced user\u00a0will immediately notice where a mistake was made. But if the error was not noticed the SQL Server will show the following message:<\/p>\n SQL Server gives a hint that there is some symbol that was missed before ‘full.bak’<\/span>. Everything that is needed to do is to add “=”:<\/p>\n The “Incorrect syntax near…” error appears if some\u00a0symbol is missed. For example, the user decided\u00a0to make a full database backup with the following command: BACKUP DATABASE Adventureworks TO DISK ‘full.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> 'full.bak'<\/span><\/pre>\n
Msg 102, Level 15, State 1, Line 17<\/span>\r\nIncorrect syntax near 'full.bak'<\/span><\/pre>\n
BACKUP DATABASE<\/span> Adventureworks TO DISK<\/span> = 'full.bak'<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"