我们如何在oracle SQL开发人员中加入两个数据库? [英] How can we join two databases in oracle SQL developer ?

查看:137
本文介绍了我们如何在oracle SQL开发人员中加入两个数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在Oracle SQL Developer中加入两个DB。我使用以下查询加入两个DB的



1. CRMVIL01

2. SVWVIL1B



表格:

1. CBLOWNER.v_customer

2. ops $ svwvil1b.account



查询

I have to join two DBs in Oracle SQL Developer. I was using the below query to join the two DB's

1. CRMVIL01
2. SVWVIL1B

Tables:
1. CBLOWNER.v_customer
2. ops$svwvil1b.account

Query

select *
 from CRMVIL01.CBLOWNER.v_customer_search a
cross join SVWVIL1B.ops$svwvil1b.account b
   on a.ACCOUNTNUMBER = b.ACCOUNT_ID

运行此查询时发生以下错误

while running this query the following error occurred

ORA-00933: SQL command not properly ended 00933. 00000 - "SQL command not properly ended" *Cause:
*Action: Error at Line: 5 Column: 31



注意:两个数据库都通过主机名(两个数据库的IP相同),SID和端口连接没有。



我尝试了什么:



在SQL开发人员中执行此操作的完整过程是什么?


Note: Both DB's are connected via hostname (IP's same of both db's), SID and port no's.

What I have tried:

What is the full procedure to run this in SQL developer?

推荐答案

svwvil1b.account



查询

svwvil1b.account

Query
select *
 from CRMVIL01.CBLOWNER.v_customer_search a
cross join SVWVIL1B.ops


svwvil1b.account b
on a.ACCOUNTNUMBER = b.ACCOUNT_ID
svwvil1b.account b on a.ACCOUNTNUMBER = b.ACCOUNT_ID

运行此查询时发生以下错误

while running this query the following error occurred

ORA-00933: SQL command not properly ended 00933. 00000 - "SQL command not properly ended" *Cause:
*Action: Error at Line: 5 Column: 31



注意:两个DB都通过主机名连接( IP同样是db()),SID和端口号。



我尝试过:



什么是完整的程序o在SQL开发人员中运行吗?


Note: Both DB's are connected via hostname (IP's same of both db's), SID and port no's.

What I have tried:

What is the full procedure to run this in SQL developer?


有一件事是你似乎正在进行交叉连接。交叉连接是笛卡尔积,因此ON定义不是语法的一部分。尝试

One thing is that you seem to be doing a cross join. A cross join is a Cartesian product so ON definition is not part of the syntax. Try
select * 
from CRMVIL01.CBLOWNER.v_customer_search a 
cross join SVWVIL1B.ops


这篇关于我们如何在oracle SQL开发人员中加入两个数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆