- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: JOIN statement with Oracle
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2004 11:09 PM
тАО08-02-2004 11:09 PM
It seems I have problem with my SQL syntax:
SQL> SELECT nn.node_name, no.node_type FROM opc_node_names nn JOIN opc_nodes no ON no.node_id=nn.node_id;
SELECT nn.node_name, no.node_type FROM opc_node_names nn JOIN opc_nodes no ON no.node_id=nn.node_id
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
The star is under the first JOIN.
I use an Oracle 8.1.7 database.
Can someone help me?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2004 11:18 PM
тАО08-02-2004 11:18 PM
Re: JOIN statement with Oracle
would that be :
SELECT nn.node_name, no.node_type FROM opc_node_names nn, opc_nodes no
where no.node_id=nn.node_id
Regards,
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2004 11:37 PM
тАО08-02-2004 11:37 PM
Re: JOIN statement with Oracle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2004 11:38 PM
тАО08-02-2004 11:38 PM
Re: JOIN statement with Oracle
Also :
http://otn.oracle.com/products/oracle9i/daily/jan14.html
Regards,
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2004 11:43 PM
тАО08-02-2004 11:43 PM
Re: JOIN statement with Oracle
select department_name, city
from department d
JOIN location l
ON (d.location_id = l.id);
select emp_id, city_name, dept_name
from locations l
JOIN departments d ON (d.location_id = l.location_id)
JOIN employees e ON (d.department_id = e.department_id);
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2004 11:59 PM
тАО08-02-2004 11:59 PM
Re: JOIN statement with Oracle
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 12:55 AM
тАО08-03-2004 12:55 AM
Re: JOIN statement with Oracle
found Metalink doc id that says that Oracle is not compliant with ANSI SQL92 regarding this syntax but this supported from Oracle9i
doc id: Note:104306.1
Regards,
Jean-Luc
PS : also found this PDF doc (in French)
http://www.trivadis.ch/Images/nf9isql_teil2_fr_tcm8-3502.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 01:34 AM
тАО08-03-2004 01:34 AM
SolutionA few notes about the differences: 8i v/s 9i
to join in 8i, just use a where clause:
select *
from emp, dept
where emp.deptno = dept.deptno;
in 9i and up, you could
select ename, dname, emp.deptno, dept.deptno
from SCOTT.EMP inner join SCOTT.DEPT
on emp.deptno = dept.deptno
to outer join 8i, use a (+)
select * from emp, dept where emp.deptno = dept.deptno(+)
is the same as the 9i syntax of:
select ename, dname, emp.deptno, dept.deptno
from SCOTT.EMP LEFT outer join SCOTT.DEPT
on emp.deptno = dept.deptno
whereas
select * from emp, dept where emp.deptno(+) = dept.deptno
is the same as:
select ename, dname, emp.deptno, dept.deptno
from SCOTT.EMP RIGHT outer join SCOTT.DEPT
on emp.deptno = dept.deptno
In 8i, a full outer join would be:
select * from emp, dept where emp.deptno = dept.deptno(+)
UNION ALL
select * from emp, dept where emp.deptno(+) = dept.deptno AND emp.deptno is
null;
versus the 9i syntax (which does the same amount of work -- no magic there)
select *
from SCOTT.EMP FULL outer join SCOTT.DEPT
on emp.deptno = dept.deptno
hope this helps too!
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2004 01:34 AM
тАО08-03-2004 01:34 AM
Re: JOIN statement with Oracle
A few notes about the differences: 8i v/s 9i
to join in 8i, just use a where clause:
select *
from emp, dept
where emp.deptno = dept.deptno;
in 9i and up, you could
select ename, dname, emp.deptno, dept.deptno
from SCOTT.EMP inner join SCOTT.DEPT
on emp.deptno = dept.deptno
to outer join 8i, use a (+)
select * from emp, dept where emp.deptno = dept.deptno(+)
is the same as the 9i syntax of:
select ename, dname, emp.deptno, dept.deptno
from SCOTT.EMP LEFT outer join SCOTT.DEPT
on emp.deptno = dept.deptno
whereas
select * from emp, dept where emp.deptno(+) = dept.deptno
is the same as:
select ename, dname, emp.deptno, dept.deptno
from SCOTT.EMP RIGHT outer join SCOTT.DEPT
on emp.deptno = dept.deptno
In 8i, a full outer join would be:
select * from emp, dept where emp.deptno = dept.deptno(+)
UNION ALL
select * from emp, dept where emp.deptno(+) = dept.deptno AND emp.deptno is
null;
versus the 9i syntax (which does the same amount of work)
select *
from SCOTT.EMP FULL outer join SCOTT.DEPT
on emp.deptno = dept.deptno
hope this helps too!
regards
Yogeeraj