Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Return at least some info

Re: Return at least some info

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Thu, 19 Dec 2002 09:37:44 -0800
Message-ID: <3E0203E8.796AF01F@exesolutions.com>


Jane O wrote:

> Using EMP as example with ONE EXTRA column - COMPANY - that has the SAME
> value
> "MSOFT"
> EMPNO NUMBER(4)
> ENAME VARCHAR2(10) Y
> JOB VARCHAR2(9) Y
> MGR NUMBER(4) Y
> HIREDATE DATE Y
> SAL NUMBER(7,2) Y
> COMM NUMBER(7,2) Y
> DEPTNO NUMBER(2) Y
> COMPANY VARCHAR2(10) Y
>
> How can I return this:
>
> COMPANY COUNT(*)
> ---------- ----------
> MSOFT 0
>
> with a query like :
>
> SQL> select max(company), count(*) from emp where job = 'ACTOR' ;
> ...when there is NO such job as "ACTOR" ?
> Thanks

I would like to say that after reading your example twice I understand what you are trying to do ... but I don't. If no one else provides an answer that works perhaps you could repost your request and example being far clearer about what you are trying to do.

But please do so in only one usenet group.

Daniel Morgan Received on Thu Dec 19 2002 - 11:37:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US