หาค่าออกมาได้แล้ว
case
when round(product_uom.factor) > 1 then stock_move.product_qty
when round(product_uom.factor) < 1 then stock_move.product_qty / product_uom.factor
else stock_move.product_qty * (select round( max(factor) ) from product_uom uom2
where uom2.category_id = product_uom.category_id)
end as max_factor
ต้องการให้แสดงเป็นแต่ละเดือนด้วย
case date_part('month',stock_picking.date_done)
when 1 then product_qty
else 0
end as january
จะเอา 2 อันนี้มารวมกันยังไงคะ เพื่อให้คำตอบออกมาเป็นแต่ละเดือน
การใช้ case when ซ้อน case when ต้องเชื่อมยังไงคะ
Moderator: mindphp
-
- PHP Full Member
- Posts: 32
- Joined: 06/08/2011 11:26 am
-
- Similar Topics
- Replies
- Views
- Last post
-
- 0 Replies
- 2518 Views
-
Last post by thitikorn_lp
17/01/2015 3:12 pm
-
-
หลักการเขียน Use Case Diagram
by pnut » 10/08/2016 11:20 am » in Microsoft Office Knowledge & line & Etc - 0 Replies
- 1098 Views
-
Last post by pnut
10/08/2016 11:20 am
-
-
- 0 Replies
- 1548 Views
-
Last post by M027
07/08/2015 3:11 pm
-
- 0 Replies
- 1860 Views
-
Last post by jay_limm
04/06/2014 11:43 am
Who is online
Users browsing this forum: No registered users and 13 guests