Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
RAVSKINS
Starting Member
21 Posts |
Posted - 2009-09-02 : 17:34:00
|
| Okay - trying to INSERT multiple rows of data from one DB to another. My query:INSERT INTO [dbo].[RAVSKINS_2000].[Attachment] SELECT * FROM [dbo].[RAVSKINS_2009].[Attachment] WHERE Request_ID = '78980AA7-27ED-4866-9C84-BEFF5BA88030' OR Response_ID = '7D760903-97E5-4E5D-AACD-454E2F32D802'Returned the following errors:Server: Msg 208, Level 16, State 1, Line 1Invalid object name 'dbo.SEMS_ESTS.Attachment'.Server: Msg 208, Level 16, State 1, Line 1Invalid object name 'dbo.SEMS_ESTS_1113.Attachment'.Any help would be greatly appreciated. |
|
|
RAVSKINS
Starting Member
21 Posts |
Posted - 2009-09-02 : 17:49:33
|
quote: Originally posted by RAVSKINS Okay - trying to INSERT multiple rows of data from one DB to another. My query:INSERT INTO [dbo].[RAVSKINS_2000].[Attachment] SELECT * FROM [dbo].[RAVSKINS_2009].[Attachment] WHERE Request_ID = '78980AA7-27ED-4866-9C84-BEFF5BA88030' OR Response_ID = '7D760903-97E5-4E5D-AACD-454E2F32D802'Returned the following errors:Server: Msg 208, Level 16, State 1, Line 1Invalid object name 'dbo.SEMS_ESTS.Attachment'.Server: Msg 208, Level 16, State 1, Line 1Invalid object name 'dbo.SEMS_ESTS_1113.Attachment'.Any help would be greatly appreciated.
Sorry, this should've been posted in the SQL 2000 section. |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-09-02 : 17:54:18
|
| assuming [Attachment] is the table, put the schema between the db and table:RAVSKINS_2000.dbo.Attachmentbut the error doesn't match your code? Is the error from a different statement? Or perhaps the RAVSKINS_2009..attachment is a view?Be One with the OptimizerTG |
 |
|
|
RAVSKINS
Starting Member
21 Posts |
Posted - 2009-09-02 : 18:07:23
|
quote: Originally posted by TG assuming [Attachment] is the table, put the schema between the db and table:RAVSKINS_2000.dbo.Attachmentbut the error doesn't match your code? Is the error from a different statement? Or perhaps the RAVSKINS_2009..attachment is a view?Be One with the OptimizerTG
Worked like a charm. Thanks for the help! |
 |
|
|
ScottWhigham
Starting Member
49 Posts |
Posted - 2009-09-03 : 06:21:01
|
| Just for reference, the format (in SQL Server 2000) for queries is Instance.Database.Owner.Object:SELECT * FROM MySqlServer.RAVSKINS_2009.dbo.attachment-- If you are logged into the MySqlServer server already, you can drop it:SELECT * FROM RAVSKINS_2009.dbo.attachment-- If you are already in the RAVSKINS_2009 database, you can drop it:SELECT * FROM dbo.attachment========================================================I have about 1,000 video tutorials on SQL Server 2008, 2005, and 2000 over at http://www.learnitfirst.com/Database-Professionals.aspx |
 |
|
|
|
|
|
|
|