Note that there are some explanatory texts on larger screens.

plurals
  1. POSQL multiple calculation to be in sequence + roundup value
    primarykey
    data
    text
    <p>I'm need to update a table with calculation in sequence to get the correct final result. But i think when i execute the below statement it runs all the calculation at the same time, causing the result calculated wrongly. What i need is to get something like this:</p> <p>Daily X O.F = Order</p> <p>Then next</p> <p>Daily X ( O.F + MCT + Transit + Safety) / Container Size = No. of Kanban Card</p> <p>(<em>Roundup the result of "No. of Kanban Card" for example 3.0 become 4</em>)</p> <p>Then next</p> <p>O.F X Daily / Container Size = Run Line</p> <p>(<em>Roundup the result of "Run Line" for example 3.0 become 4</em>)</p> <p>Then next</p> <p>Run Line X Container Size = Lot Size</p> <p>Then next</p> <p>No. Of KanBan Card X Container Size = Max Inventory</p> <p>Then next</p> <p>(No. Of KanBan Card - Run Line) X Container Size = Trigger 1</p> <p>Then next</p> <p>(No. Of KanBan Card - Run Line - 1) X Container Size = Trigger 2</p> <p>Then next</p> <p>(No. Of KanBan Card - Run Line - 2) X Container Size = Trigger 3</p> <p>Last</p> <p>Daily X (0.5 X (O.F + MCT) + Transit + Safety) = Avg Inventory</p> <pre><code>SELECT [Part Num], Daily, [O.F], [Order], MCT, Transit, [Safety], [Container Size], [No. of Kanban Card], [Run Line], [Lot Size], [Max. Inventory], [Trigger 1], [Trigger 2], [Trigger 3], [Avg. Inventory], (Daily * [O.F]) AS [Order], (Daily * ([O.F] + MCT + Transit + [Safety]) / [Container Size]) AS [No. of Kanban Card], ([O.F] * Daily / [Container Size]) AS [Run Line], ([Run Line] * [Container Size]) AS [Lot Size], ([No. of Kanban Card] * [Container Size]) AS [Max. Inventory], (([No. of Kanban Card] - [Run Line]) * [Container Size]) AS [Trigger 1], (([No. of Kanban Card] - [Run Line] - 1) * [Container Size]) AS [Trigger 2], (([No. of Kanban Card] - [Run Line] - 2) * [Container Size]) AS [Trigger 3], (Daily * (0.5 * ([O.F] + MCT) + Transit + [Safety])) AS [Avg. Inventory] FROM SuperMarketTest </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload