Case - When in ofbiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Case - When in ofbiz

Deepak Agarwal-2
Is there a way in ofbiz DynamicViewEntity to simulate following db query :

select ii.inventory_item_id,
(case when sr.datetime_received > '2012-01-02 00:00:00' then
sum(quantity_on_hand_total) END) as 12month,
 (case when sr.datetime_received > '2012-10-02 00:00:00' then
sum(quantity_on_hand_total) END) as 6month,
(case when sr.datetime_received > '2013-03-02 00:00:00' then
sum(quantity_on_hand_total) END) as 1month
from inventory_item ii inner join shipment_receipt sr on
ii.inventory_item_id=sr.inventory_item_id where
ii.product_id='017J1VE9PQG0I'


--
Thanks,
Deepak Agarwal,

Mobile: +91 9501190044
Reply | Threaded
Open this post in threaded view
|

Re: Case - When in ofbiz

Deepak Agarwal-2
Anyone...

On Tue, Mar 12, 2013 at 1:12 AM, Deepak Agarwal <[hidden email]>wrote:

> Is there a way in ofbiz DynamicViewEntity to simulate following db query :
>
> select ii.inventory_item_id,
> (case when sr.datetime_received > '2012-01-02 00:00:00' then
> sum(quantity_on_hand_total) END) as 12month,
>  (case when sr.datetime_received > '2012-10-02 00:00:00' then
> sum(quantity_on_hand_total) END) as 6month,
> (case when sr.datetime_received > '2013-03-02 00:00:00' then
> sum(quantity_on_hand_total) END) as 1month
> from inventory_item ii inner join shipment_receipt sr on
> ii.inventory_item_id=sr.inventory_item_id where
> ii.product_id='017J1VE9PQG0I'
>
>
> --
> Thanks,
> Deepak Agarwal,
>
> Mobile: +91 9501190044
>



--
Thanks,
Deepak Agarwal,

Mobile: +91 9501190044
Reply | Threaded
Open this post in threaded view
|

Re: Case - When in ofbiz

Deepak Agarwal-2
No one came across this problem...

I think in current implementation it is not possible to simulate these
queries...

On Tue, Mar 12, 2013 at 10:29 AM, Deepak Agarwal <[hidden email]>wrote:

> Anyone...
>
>
> On Tue, Mar 12, 2013 at 1:12 AM, Deepak Agarwal <[hidden email]>wrote:
>
>> Is there a way in ofbiz DynamicViewEntity to simulate following db query :
>>
>> select ii.inventory_item_id,
>> (case when sr.datetime_received > '2012-01-02 00:00:00' then
>> sum(quantity_on_hand_total) END) as 12month,
>>  (case when sr.datetime_received > '2012-10-02 00:00:00' then
>> sum(quantity_on_hand_total) END) as 6month,
>> (case when sr.datetime_received > '2013-03-02 00:00:00' then
>> sum(quantity_on_hand_total) END) as 1month
>> from inventory_item ii inner join shipment_receipt sr on
>> ii.inventory_item_id=sr.inventory_item_id where
>> ii.product_id='017J1VE9PQG0I'
>>
>>
>> --
>> Thanks,
>> Deepak Agarwal,
>>
>> Mobile: +91 9501190044
>>
>
>
>
> --
> Thanks,
> Deepak Agarwal,
>
> Mobile: +91 9501190044
>



--
Thanks,
Deepak Agarwal,

Mobile: +91 9501190044