我正在尝试合并\组合两个数据表。我查看了各种示例和答案,但它们似乎创建了重复的行或需要索引(合并数据表等)
我不能通过 SQL 执行此操作,因为一个源来自通过 MSSQL 访问的链接 Oracle 服务器,另一个来自没有链接访问的不同 MSSQL 服务器。
目前数据很简单:
Name, Email, Phone
数据表1:
"John Clark", "", "01522 55231"
"Alex King", "alex.king@somecompany.com", "01522 55266"
"Marcus Jones", "marcus.jones@somecompany.com", "01522 55461"
数据表2:
"John Clark", "john.clark@somecompany.com", "01522 55231"
"Alex King", "alex.king@somecompany.com", ""
"Marcus Jones", "marcus.jones@somecompany.com", "01522 55461"
"Warren bean", "warren.bean@somecompany.com", "01522 522311"
提供具有以下内容的数据表:
"John Clark", "john.clark@somecompany.com", "01522 55231"
"Alex King", "alex.king@somecompany.com", "01522 55266"
"Marcus Jones", "marcus.jones@somecompany.com", "01522 55461"
"Warren bean", "warren.bean@somecompany.com", "01522 522311"
名称是匹配记录的字段,第一个数据表优先。