mirror of
https://github.com/IdalecioSch/dbTrabai.git
synced 2026-07-28 00:30:28 -03:00
menos ilegivel
This commit is contained in:
committed by
GitHub
parent
7dc8b8b862
commit
bbc4a50760
+1
-2
@@ -21,8 +21,7 @@ BEGIN
|
|||||||
UPDATE encomenda
|
UPDATE encomenda
|
||||||
SET valor = (
|
SET valor = (
|
||||||
SELECT COALESCE(
|
SELECT COALESCE(
|
||||||
SUM(m.custo + LENGTH(i.frase) * m.valor_letra),
|
SUM(m.custo + LENGTH(i.frase) * m.valor_letra), 0.00
|
||||||
0.00
|
|
||||||
)
|
)
|
||||||
-- Coalese pq ele tenta pegar sum, se ficar null, retorna 0.00 msm, como um operador ternario
|
-- Coalese pq ele tenta pegar sum, se ficar null, retorna 0.00 msm, como um operador ternario
|
||||||
FROM item i
|
FROM item i
|
||||||
|
|||||||
Reference in New Issue
Block a user