refs #6834 feat:handle Error #2057
|
@ -8,6 +8,25 @@ BEGIN
|
|||
* @param vSaleGroupFk Identificador de vn.saleGroup
|
||||
* @param vSectorCollectionFk Identificador de vn.sectorCollection
|
||||
*/
|
||||
DECLARE vHasSaleGroup INT;
|
||||
DECLARE vHasSectorCollection INT;
|
||||
|
||||
SELECT COUNT(id) INTO vHasSaleGroup
|
||||
FROM saleGroup
|
||||
|
||||
WHERE id = vSaleGroupFk;
|
||||
|
||||
IF !vHasSaleGroup THEN
|
||||
CALL util.throw ("invalid saleGroup");
|
||||
jgallego
commented
Els throws van en minúscules i separades, busca un exemple Els throws van en minúscules i separades, busca un exemple
sergiodt
commented
He trobat un poc de tot, ho apunte en Convenciones SQL ? He trobat un poc de tot, ho apunte en Convenciones SQL ?
|
||||
END IF;
|
||||
|
||||
SELECT COUNT(id) INTO vHasSectorCollection
|
||||
FROM sectorCollection
|
||||
WHERE id = vSectorCollectionFk;
|
||||
|
||||
IF !vHasSectorCollection THEN
|
||||
CALL util.throw ("invalid sectorCollection");
|
||||
END IF;
|
||||
|
||||
REPLACE sectorCollectionSaleGroup
|
||||
SET sectorCollectionFk = vSectorCollectionFk,
|
||||
saleGroupFk = vSaleGroupFk;
|
||||
|
|
Loading…
Reference in New Issue
FROM saleGroup
sols una taula va sense alias
Fet