salix/db/routines/vn/procedures/buy_checkGrouping.sql

15 lines
344 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_checkGrouping`(vGrouping INT)
BEGIN
/**
* Checks the buy grouping, throws an error if it's invalid.
*
* @param vGrouping The grouping
*/
IF vGrouping = 0 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = 'Grouping cannot be zero';
END IF;
END$$
DELIMITER ;