Backuping error

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2008
Posts: 57
Reputation: konczuras is an unknown quantity at this point 
Solved Threads: 1
konczuras konczuras is offline Offline
Junior Poster in Training

Backuping error

 
0
  #1
Nov 19th, 2008
Hello!

I want to use the following code

  1. SELECT *
  2. INTO Persons_Backup IN 'Backup.mdb'
  3. FROM Persons

But all I ever get is the error message: "Incorrect syntax near IN"
How could I solve this?

But when I miss the IN clause, it works perfectly.
I think the problem is that I'm not connected to the second database, which I need to copy the data into. But how is it possible to be connected to two databases via one connection string?

Thank you very much!
Last edited by peter_budo; Nov 19th, 2008 at 8:26 pm. Reason: Please [code] tag, instead of [quote]
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 252
Reputation: ProfessorPC is an unknown quantity at this point 
Solved Threads: 27
ProfessorPC ProfessorPC is offline Offline
Posting Whiz in Training

Re: Backuping error

 
0
  #2
Nov 24th, 2008
try this
  1. USE Persons;
  2. GO
  3. BACKUP DATABASE Persons
  4. TO DISK = 'Z:\SQLServerBackups\Persons.Bak'
  5. WITH FORMAT,
  6. MEDIANAME = 'Z_SQLServerBackups',
  7. NAME = 'Full Backup of Persons';
  8. GO
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MS SQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC