Re: view-entity subquery WHERE clauses supported?

Posted by Christian Carlow-OFBizzer on
URL: http://ofbiz.116.s1.nabble.com/view-entity-subquery-WHERE-clauses-supported-tp4643984p4643989.html

For a little perspective,

Essentially what I'm trying to accomplish is a simplified shipping
schedule list based on order item ship group due quantities.

I created a view-entity that joins together orderHeader, orderItem,
orderItemShipGroup, and orderItemshipGroupAssoc.

Additionally I created a view entity that joins together itemIssuance
and Shipment and joined this view-entity twice to the previous view
entity mentioned but created one with a condition where
Shipment.statusId = "SHIPMENT_SHIPPED" and the other with a condition
where Shipment.statusId = "SHIPMENT_INPUT".

I'm trying to get the total amount issued with sum(II.quantity -
II.cancelQuantity), which references the second join where
Shipment.statusId = "SHIPMENT_INPUT"

and the total amount not shipped with MIN(OISGA.quantity) -
sum(II.quantity - II.cancelQuantity) which references the first join
where Shipment.statusId = "SHIPMENT_SHIPPED"

On 09/16/2013 10:57 AM, Christian Carlow wrote:
> Does anyone know if it is possible to constrain joined view-entity
> subqueries with their own WHERE clauses?
>
> For example:
>
> select * from tbl1 left join (select * from tbl2 where tbl2.col1 =
> 'someVal') tbl3 on tbl1.col1 = tbl3.col1