TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prabu Spark
NA
124
204.4k
Error in Sql server query
Aug 21 2013 2:28 AM
Hi sir,
I am getting the error
"Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '+'.
Msg 319, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon." after executing the below query. Kindly give me the solution for this problem
Query:
----------------
declare @backuptime varchar(50)
set @backuptime=convert(varchar,getdate())
BACKUP DATABASE checking TO DISK = 'd:\testdb1_'+@backuptime+'.bak' WITH FORMAT, MEDIANAME = 'checking', NAME = 'Full backup of my database';
GO
Reply
Answers (
3
)
SQL Server Management Studio 2005
co-related query