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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Archive data from one database into another

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-14 : 22:05:41
Dameion writes "I am trying to create some jobs to Archive data from one database to another database on the same sql server. This doesn't seem like that tough of an issue however I can't seem to get this to work. I was trying to perform a select from [databasename].[tablename] and it says that is an invalid object name. And the [dbo] object only contains table within your current database. Any suggestions?

Right now I am just trying to get the syntax correct in query analyzer. I am basically doing a and instert into datbase2.archivetable with the data for that being a select from database1.originaltable.


Thanks,

Dameion"

Nazim
A custom title

1408 Posts

Posted - 2002-04-15 : 00:34:46
did you followed the four part naming convention.

Servername.databasename.owner.tablename

if your servername is same then

databasename..tablename


insert into tablename(column1) select column1 from databasename..tablename

HTH

--------------------------------------------------------------
Go to Top of Page
   

- Advertisement -