Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 16th, 2007, 04:25 PM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Importing data from one database to another

Hi

I have an access database with a table called products with over 100000 products provided by 100 suppliers. Each product has a unique supplier id.I frequently need to update this table with new supplier catalogues. This information is contained in another database provided by each supplier which has an identical table structure as the products table. What is the most efficient way to import this data in to my original database using an sql query?

 
Old January 18th, 2007, 08:36 AM
Registered User
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i am also having the same problem, i want to move some tables from one database to another database in sql server 2005. please help me if you find any solution.

 
Old January 25th, 2007, 03:04 PM
Authorized User
 
Join Date: Jan 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not sure if this is the BEST method, but if the table structures are identical you can use:

INSERT INTO database_name.owner.table_name
SELECT * FROM other_database_name.owner.table_name



 
Old January 25th, 2007, 04:05 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You could also use a SELECT [column] INTO database_name.owner.table_name FROM other_database_name.owner.table_name

Again, the table structures have to match identically.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
SSIS: Use filename as data when importing data slesicki SQL Server 2005 0 August 7th, 2006 05:00 PM
Importing XML into database siachen00 Other Programming Languages 0 April 21st, 2006 09:35 AM
Importing XML into database siachen00 XML 0 April 21st, 2006 09:30 AM
Importing Data to MsAccess ranakdinesh ADO.NET 2 February 24th, 2005 10:03 AM
Importing data from .csv Spitzbucket PHP Databases 0 February 20th, 2005 01:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.