i want to provide additional condition before sql execution,,
the condition is :
IF the orc EXIST on table outputcut
run the sql:
SET @orc='G1-21E014E-1';
SELECT
oc.size AS size,
ic.qty AS `order`,
oc.qty AS output,
IF( ic.qty-oc.qty >0, 'sisa', IF (ic.qty-oc.qty < 0, 'kurang','cukup')) AS produksi,
ic.qty-oc.qty AS WIP
.....
,
ELSE run sql :
SELECT
'Production hasn't started yet'
please help me to adding if condition on this quaery
Aucun commentaire:
Enregistrer un commentaire