Created
November 24, 2018 19:26
-
-
Save joseparedespy/3ee71aa3dab6664f2385ee78c675e37d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER // | |
CREATE FUNCTION verificarSolicitud(_fecha date, _idEmpleado int) | |
RETURNS BIT | |
BEGIN | |
DECLARE _result BIT; | |
IF (select COUNT(*) fROM solicitud WHERE Empleado_idEmpleado = _idEmpleado AND _fecha BETWEEN fechaDesde AND fechaHasta) > 0 | |
THEN | |
SET _result = 1; | |
ELSE | |
SET _result = 0; | |
END IF; | |
RETURN _result; | |
END // | |
DELIMITER ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment