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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle Subquery Question

Re: Oracle Subquery Question

From: RHC <rclarence_at_juno.com>
Date: Tue, 23 Jan 2001 15:30:08 -0000
Message-ID: <t6r8s0os53f5f7@corp.supernews.com>

I believe a simpler way to write this query would be: select part_no, sum(qty_onhand)
from inventory_part_location_tab
group by part_no

Try that, let me know how that works...

HTH
RHC
SL wrote:
>
>
> I am having a problem with what should be a simple query. The
> following query is returning a ORA-00936, 'Missing Expression' error
> message.
>
> select a.part_no,
> (SELECT sum(qty_onhand) FROM inventory_part_location_tab b
> WHERE a.part_no = b.part_no)
> from inventory_part_tab a
>
> I am trying to return two fields, part_no and a sum of quantities.
> What am I missing?
>
> TIA

--
Posted via CNET Help.com
http://www.help.com/
Received on Tue Jan 23 2001 - 09:30:08 CST

Original text of this message

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