mirror of
https://github.com/IdalecioSch/dbTrabai.git
synced 2026-07-28 08:47:13 -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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user