[英]How to get a data's from one database to other database?
Using SQL 2000, SQL 2005 使用SQL 2000,SQL 2005
Old Database Name is – Sysdatabase
New Database Name is - Dual_Proone, Dual_Protwo
In the above two database table name and column name are different, but values are same. 在上面的两个数据库中,表名和列名是不同的,但是值是相同的。
For Example 例如
Sysdatabase (Database Name)
Person (Table Name)
Column Names and values are
ID Date
001 23-02-2009
002 24-02-2009
So on…, 等等...,
Company (Table Name)
Column Names and Values are
Code Name
1001 Micorsoft
1002 Dell
So on.., 等等..,
Dual_Proone (Database Name)
T_person (Table Name)
Column Names and values are
EmpID, Cardeventdate
001 23-02-2009
002 24-02-2009
So on.., 等等..,
Dual_Protwo (Database Name)
T_Company (Table Name)
Column Names and values are
CoCode, CoName
1001 Micorsoft
1002 Dell
So on.., 等等..,
From the above two database, Table and column are different, but values are same. 在上述两个数据库中,表和列不同,但是值相同。
Here I want to take all the values from dual_Proone and dual_protwo to sysdatabase 在这里,我想将所有值从dual_Proone和dual_protwo传递到sysdatabase
My software is connecting with sysdatabase, but I need the values from dual_Proone, dual_Protwo database. 我的软件正在与sysdatabase连接,但是我需要来自dual_Proone,dual_Protwo数据库中的值。
I cannot able to change the Table name and Column names in the software, I want to take a data's from dual_Proone and dual_Protwo 我无法在软件中更改表名和列名,我想从dual_Proone和dual_Protwo获取数据
Is Possible by using trigger? 使用触发器是否可能?
Please can any one help to solve my problem 请任何人帮忙解决我的问题
Need query Help. 需要查询帮助。
In Sql Server 2005, it is possible to select from a different database useing 在Sql Server 2005中,可以从其他数据库中选择使用
ServerName.DatabaseName.dbo.Table (if it is a different server, the server must be linked.) ServerName.DatabaseName.dbo.Table(如果它是其他服务器,则必须链接该服务器。)
So you can SELECT * FORM Dual_Proone.dbo.T_person as if the table was in the same database. 因此,您可以选择* FORM Dual_Proone.dbo.T_person,就像表位于同一数据库中一样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.