Solved

Append /Update SQL with .mdf file

Posted on 2006-11-02
4
386 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
Comment Utility
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
Comment Utility
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]
Comment Utility
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
Comment Utility
Thanks so much
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

763 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

10 Experts available now in Live!

Get 1:1 Help Now