salix/db/routines/vn/procedures/deviceProductionUser_getWor...

15 lines
468 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`deviceProductionUser_getWorker`(vAndroid_id VARCHAR(64))
BEGIN
/**
* Selecciona si hay registrado un device con un android_id
*
* @param vAndroid_id el número android_id del dispositivo
*/
SELECT account.user_getNameFromId(dpu.userFk)
FROM deviceProductionUser dpu
JOIN deviceProduction dp ON dpu.deviceProductionFk = dp.id
WHERE dp.android_id = vAndroid_id;
END$$
DELIMITER ;