handle nulls
This commit is contained in:
parent
379e6a5160
commit
7f5994a40d
@ -289,7 +289,7 @@ BEGIN
|
|||||||
AND tp.ds = _last_dataseg
|
AND tp.ds = _last_dataseg
|
||||||
AND tp.chan = _chan
|
AND tp.chan = _chan
|
||||||
AND tp.tier = _tier
|
AND tp.tier = _tier
|
||||||
AND FLOOR(_last_qty / _pltq)::int <@ tp.vol;
|
AND FLOOR(_last_qty / NULLIF(_pltq, 0))::int <@ tp.vol;
|
||||||
|
|
||||||
------------------------------------------------------------------
|
------------------------------------------------------------------
|
||||||
-- Step 4: Cost data for normalization
|
-- Step 4: Cost data for normalization
|
||||||
|
Loading…
Reference in New Issue
Block a user