menos ilegivel

This commit is contained in:
Idalecio Schvartz Sobrinho
2026-06-30 11:03:57 -03:00
committed by GitHub
parent 7dc8b8b862
commit bbc4a50760
+1 -2
View File
@@ -21,8 +21,7 @@ BEGIN
UPDATE encomenda
SET valor = (
SELECT COALESCE(
SUM(m.custo + LENGTH(i.frase) * m.valor_letra),
0.00
SUM(m.custo + LENGTH(i.frase) * m.valor_letra), 0.00
)
-- Coalese pq ele tenta pegar sum, se ficar null, retorna 0.00 msm, como um operador ternario
FROM item i