Seth: Let me preface my remarks by stating that I am using MS SQL. Here is what I would do:
INSERT INTO server.database.owner.tablename (column1, column2, ...) SELECT column1, column2, ... FROM server.database2.owner.tablename The trick is to set up a single user id on the server that can access both databases. The syntax fully qualifies both the source and destination. You can move data (and even join tables) across databases on the same server. You may even be able to join data across servers, but I've never done that. I have joined and moved tables from different databases on the same server. Sincerely, Brooks Wilson Things ain't what they used to be and probably never was. - Will Rogers Federal Reserve Bank of Atlanta · 1000 Peachtree Street, N.E. · Atlanta Georgia 30309-4470 404.498.8178 · fax 404.498.8239 · [EMAIL PROTECTED] [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 07/13/2007 10:20 AM Please respond to [email protected] To [email protected] cc Subject Re: [ACFUG Discuss] moving tables across data sources If you are using SQL Server, you can use DTS Jay x8453 "Tepfer, Seth" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 07/13/2007 09:44 AM Please respond to [email protected] To <[email protected]> cc Subject [ACFUG Discuss] moving tables across data sources What is the quick and easy way to copy a table from one data source to another? The table structure exists, it?s just empty. I was thinking of doing some SQL like: INSERT INTO carrierLanesCopy SELECT carrierLanes.* FROM carrierLanes; But then I realized there is no reference to DS in the query itself. Stupid. I don?t want to have to loop over each line of the table, reading and writing. There has to be a better way, right? seth ------------------------------------------------------------- Annual Sponsor - Figleaf Software To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink ------------------------------------ ------------------------------------------------------------- Annual Sponsor - Figleaf Software To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink -------------------------------------------------------------
<<image/gif>>
