MsSQL

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDatabasesMsSQL

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old July 23rd, 2015, 03:59 AM
williamsandrew1 williamsandrew1 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jul 2015
Posts: 2 williamsandrew1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 42 sec
Reputation Power: 0
Backup query result

Hello, there is a need to make backup query result. Can you suggest an easy way, please?

Reply With Quote
  #2  
Old July 23rd, 2015, 04:46 AM
Den_1985@walla. Den_1985@walla. is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jul 2015
Posts: 10 Den_1985@walla. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 49 m 4 sec
Reputation Power: 0
Hi,

A new table creation:

SELECT *
INTO newtable [IN externaldb]
FROM table1

Reply With Quote
  #3  
Old July 23rd, 2015, 05:51 AM
danlout144 danlout144 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jul 2015
Posts: 2 danlout144 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 2 m 56 sec
Reputation Power: 0
Could you please explain in a bit more detail what it is you need?

Reply With Quote
  #4  
Old July 23rd, 2015, 05:55 AM
williamsandrew1 williamsandrew1 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jul 2015
Posts: 2 williamsandrew1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 42 sec
Reputation Power: 0
Thanks for replies, I need to make backup data from a query.
I think about this: BACKUP DATABASE 'sourceDB'
Select * from Table1 where Day = '20.07.2015';
TO DISK = 'F:\Program Files\Microsoft SQL Server\MSSQL\Backup\sourceDB.bak' WITH FORMAT

Reply With Quote
  #5  
Old July 23rd, 2015, 06:12 AM
danlout144 danlout144 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jul 2015
Posts: 2 danlout144 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 2 m 56 sec
Reputation Power: 0
I would suggest next. If you have access to Management Studio, you can save query results to a file quite easily: 1.Open a query window. One way to do this is by right-clicking on the database name in the Object Explorer. 2.You might want to write the query and run it there first, to test that it is producing the desired results. 3.When you are ready to run the query and save it to file, on the menu choose Query, then Results To, and finally Results to File. 4.Now, when you run the query (F5), you will get a dialog box to indicate the filename and folder to save the data. You can find more details, if you need sqlbak.com/blog/backup-query-results/ That's all there is to it.

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesMsSQL > Backup query result


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap