DELIMITER $$ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`bankEntity_checkBic`(vBic VARCHAR(255)) 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 ;