June 8, 2006 at 5:39 am
Hi,
I want to insert rows from table1 to table2, table1=table2, but table2 is on a diferent database……
I thought the following instruction would resolve this:
insert into DB1.dbo.table1
select * from DB2.dbo.table2 where ID=’X’'
but DB2 is not recognized..even if I use DB1, DB2 or master…..
How can I do this ?
Thanks for you reply...
June 8, 2006 at 6:03 am
What is the error? Check your login has sufficient access rights in DB2.
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 8, 2006 at 6:10 am
Hi,
The error is:
insert into aks_le2.dbo.artigos
select * from aks_le.dbo.artigos where numartigo='1900'
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'aks_le2.dbo.artigos'.
June 9, 2006 at 2:47 am
if aks_le Db is on the same server, then it is definitely the access/rights issue with your Login on aks_le.
June 9, 2006 at 4:47 pm
The error tells me that in the database aks_le2 there is not an object named artigos or the aks_le2 database doesn't exists on the same instance of SQL Server.
Most likely it is due to DB / table ownership or permissions, but sometimes KISS comes into play.
-
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply