Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Reformat SQL Syntax to for a correlated SQL query?
andrewst <member14183_at_dbforums.com> wrote in message news:<3112862.1058285965_at_dbforums.com>...
> However, I suspect your problem comes from the fact that you can't
> correlate an in-line view. For example, you can't do this:
>
> select e.ename, v.dname
> from emp e,
> (select * from dept where dept.deptno = e.deptno) v
> where e.deptno = v.deptno
No views are involved.
Maybe I should simplify it better:
I'm doing something like this:
select e.ename, (select count(*) from dept where dep.deptno =
e.deptno) theCout
from emp e
But I'm doing it more advanced, and several of them. It works fine as shown.
But, if the subselect itself contains ANOTHER subselect, which references a column from a table from the main first statement, then it gives an error.
See what I mean now? Received on Thu Jul 17 2003 - 12:41:10 CDT
![]() |
![]() |