0
I need to do this same process below in Mysql;
create or alter procedure SP_ATUALIZA_ESTOQUE_COMPOSICAO (
CODEMP integer,
CODPRO integer,
QUANT numeric(18,3),
CODLOCAL integer)
as
declare variable VL_CODIGO integer;
declare variable VL_QUANT numeric(18,3);
BEGIN
FOR SELECT COD_PRO_COMPOSICAO, QUANT
FROM PRODUTOS_COMPOSICAO
WHERE COD_PRO = :CODPRO
ORDER BY COD_PRO_COMPOSICAO
INTO :VL_CODIGO, :VL_QUANT
DO
BEGIN
EXECUTE PROCEDURE SP_ATUALIZA_ESTOQUE(:CODEMP, :VL_CODIGO, (:VL_QUANT * :QUANT), :CODLOCAL);
END
END
But I’m not getting it because of FOR SELECT, I’ve always worked with Firebird and now I’m in a project using Mysql, can someone give me a tip on how to do?
FOR SELECT
as well as theFOR
ofOracle
is a cursor, search forCURSOR
in theMysql
and you’ll be able to carry the code– Ricardo Pontual