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`.`bankEntity_checkBic`(vBic VARCHAR(255))
|
2024-01-15 11:31:03 +00:00
|
|
|
BEGIN
|
|
|
|
/**
|
|
|
|
* If the bic length is Incorrect throw exception
|
|
|
|
*
|
|
|
|
* @param vBic bic code
|
|
|
|
*/
|
|
|
|
|
|
|
|
DECLARE vConfigBicLenght INT;
|
|
|
|
|
|
|
|
SELECT bicLength INTO vConfigBicLenght
|
|
|
|
FROM vn.bankEntityConfig bec;
|
|
|
|
|
|
|
|
IF LENGTH(vBic) <> vConfigBicLenght THEN
|
|
|
|
CALL util.throw(CONCAT('bic must be of length ', vConfigBicLenght ));
|
|
|
|
END IF;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|