Solved

Append /Update SQL with .mdf file

Posted on 2006-11-02
4
390 Views
Last Modified: 2008-03-17
I have SQL Server with Old Database (till Specific Date), and i have updated (.mdf & .ldf) files from the same SQL Server after that date. i want to merge or update the old Server with the new DB. how can i do that pls??

note: the two DB is identical (not in entries but in design).
0
Comment
Question by:vangeliseg06
  • 2
  • 2
4 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 125 total points
ID: 17856255
you have to attach the "old" .mdf with another name, and perform the necessary insert/update/delete statements based on the design.
0
 

Author Comment

by:vangeliseg06
ID: 17856292
i'm new in SQL, so please tell me how can i move all the data after attaching it with different name! while the two db have the same tables and everything! the different only in the date of entries, First one from 2000 to 2003 and the new fom 2004 till now.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17856307
you can insert from 1 database to another like this:

insert into new_db.dbo.tablename ( <field list> )
  select <field list> from old_db.dbo.tablename

similary you can update and delete cross databases...
0
 

Author Comment

by:vangeliseg06
ID: 17856451
Thanks so much
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now