I cannot remember how to do a basic SUM
in a SQL proceedure, can anybody remind me quickly please?
drop procedure if exists pCaCalculateCcyFluc;
delimiter //
create procedure pCaCalculateCcyFluc(
IN pPrice DECIMAL(10,6),
IN pPricePrev DECIMAL(10,6),
OUT pCcyFluc DECIMAL(10,6)
)
MODIFIES SQL DATA
COMMENT 'calculate fluctuation'
begin
pCcyFluc = (pPricePrev - pPrice)/pPrice;
--
end;
//
delimiter ;