Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / August 2005

Tip: Looking for answers? Try searching our database.

Insert a table form one database into another

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 30 Aug 2005 22:30 GMT
I have identical table structures in two databases, one on a client side and
the other on the server side.  I want to run an asp query that will take all
of the records from the client and push them into the server db.

Is this a Insert command that I have to loop for each record, if so how?

I have seen Insert Select queries talked about in this forum, will this push
the data into a server db?

I need help getting started.

Thanks
John Vinson - 31 Aug 2005 00:56 GMT
>I have identical table structures in two databases, one on a client side and
>the other on the server side.  I want to run an asp query that will take all
[quoted text clipped - 8 lines]
>
>Thanks

An APpend query will do the trick here:

INSERT INTO hosttable
SELECT ([field], [field], [field], ...)
FROM localtable;

                 John W. Vinson[MVP]    
Dave - 31 Aug 2005 01:26 GMT
Can this be:

INSERT INTO hosttable
SELECT *
FROM localtable;

Do I need to reference the database name or is that handled by the recordset
connection?

Thanks

>>I have identical table structures in two databases, one on a client side
>>and
[quoted text clipped - 19 lines]
>
>                  John W. Vinson[MVP]
John Vinson - 31 Aug 2005 20:04 GMT
>Can this be:
>
[quoted text clipped - 4 lines]
>Do I need to reference the database name or is that handled by the recordset
>connection?

Either way. If you've used ODBC or Tools... Get External Data... Link
to link to an external table, that linked table can be used in very
much the same way as a local table; or you can use the IN operator in
the SQL statement to dynamically link to a connected table.

                 John W. Vinson[MVP]    
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.