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: 2nd try

Re: 2nd try

From: Bricklen <bricklen_at_zyahoo.zcomz>
Date: Fri, 05 Nov 2004 21:06:54 GMT
Message-ID: <OXRid.83327$df2.9566@edtnps89>


Patrice Béliveau wrote:
> Hi,
>
> I have two table, one is containing a dated list of delivery to do and
> the second contain a list of delivery done.
>
> ex: Table 1 --> Order No,
> Delivery date requested,
> Quantity requested
>
> Table 2 --> Shipping No.
> Order No.
> Date shipped
> Quantity shipped
>
>
> They are not into the same list because there is no one on one
> relation between those two list (ex: some delivery might have been
> back order, or that might have been some over shipment, etc...)

So "Order No" in each table is _not_ related? As in PK/FK relationship?

> Another way of looking at it would be:
>
> - Give me all Order No, where SUM(quantity requested) > SUM(quantity
> shipped).
>
> but then sum on the left side of a test is not permitted

maybe not in the WHERE clause, but you could do it with a GROUP BY and a HAVING clause Received on Fri Nov 05 2004 - 15:06:54 CST

Original text of this message

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