2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionState_addByExpedition`(vExpeditionFk INT, vStateCode VARCHAR(100))
|
2024-01-15 11:31:03 +00:00
|
|
|
BEGIN
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Inserta nuevos registros en la tabla vn.expeditionState
|
|
|
|
*
|
|
|
|
* @param vExpeditionFk Identificador de vn.expedition
|
|
|
|
* @param vStateCode Corresponde a vn.expeditionStateType.code
|
|
|
|
*/
|
|
|
|
|
|
|
|
INSERT INTO vn.expeditionState(expeditionFk, typeFk)
|
|
|
|
SELECT vExpeditionFk, est.id
|
|
|
|
FROM vn.expeditionStateType est
|
|
|
|
WHERE est.code = vStateCode;
|
|
|
|
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|