refs #6834 feat:handle Error #2057
|
@ -12,19 +12,19 @@ BEGIN
|
||||||
DECLARE vHasSectorCollection INT;
|
DECLARE vHasSectorCollection INT;
|
||||||
|
|
||||||
SELECT COUNT(id) INTO vHasSaleGroup
|
SELECT COUNT(id) INTO vHasSaleGroup
|
||||||
FROM vn.saleGroup sg
|
FROM vn.saleGroup
|
||||||
|
|||||||
WHERE sg.id = vSaleGroupFk;
|
WHERE id = vSaleGroupFk;
|
||||||
|
|
||||||
IF !vHasSaleGroup THEN
|
IF !vHasSaleGroup THEN
|
||||||
CALL util.throw ("INVALID_SALEGROUP");
|
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;
|
END IF;
|
||||||
|
|
||||||
SELECT COUNT(id) INTO vHasSectorCollection
|
SELECT COUNT(id) INTO vHasSectorCollection
|
||||||
FROM vn.sectorCollection scsg
|
FROM vn.sectorCollection
|
||||||
WHERE scsg.id = vSectorCollectionFk;
|
WHERE id = vSectorCollectionFk;
|
||||||
|
|
||||||
IF !vHasSectorCollection THEN
|
IF !vHasSectorCollection THEN
|
||||||
CALL util.throw ("INVALID_SECTORCOLLECTION");
|
CALL util.throw ("invalid sectorCollection");
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
REPLACE sectorCollectionSaleGroup
|
REPLACE sectorCollectionSaleGroup
|
||||||
|
|
Loading…
Reference in New Issue
FROM saleGroup
sols una taula va sense alias
Fet