feat: refs #5855 drop temporary table #2040
|
@ -484,8 +484,7 @@ proc: BEGIN
|
||||||
|
|
||||||
DROP TEMPORARY TABLE
|
DROP TEMPORARY TABLE
|
||||||
edi.offer,
|
edi.offer,
|
||||||
itemToInsert,
|
itemToInsert;
|
||||||
tmp.buyRecalc;
|
|
||||||
|
|
||||||
SET @isTriggerDisabled = FALSE;
|
SET @isTriggerDisabled = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ BEGIN
|
||||||
|
|
||||||
SET @order = 0;
|
SET @order = 0;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.newSaleList;
|
DROP TEMPORARY TABLE IF EXISTS tNewSaleList;
|
||||||
|
|
||||||
CREATE TEMPORARY TABLE tmp.newSaleList
|
CREATE TEMPORARY TABLE tNewSaleList
|
||||||
SELECT id as saleFk, @order := @order + 1 as orden
|
SELECT id as saleFk, @order := @order + 1 as orden
|
||||||
FROM vn.sale
|
FROM vn.sale
|
||||||
WHERE ticketFk = vTargetTicketFk
|
WHERE ticketFk = vTargetTicketFk
|
||||||
|
@ -28,8 +28,8 @@ BEGIN
|
||||||
SELECT ns.saleFk, sc.componentFk, sc.value
|
SELECT ns.saleFk, sc.componentFk, sc.value
|
||||||
FROM vn.saleComponent sc
|
FROM vn.saleComponent sc
|
||||||
JOIN tmp.saleList s ON s.saleFk = sc.saleFk
|
JOIN tmp.saleList s ON s.saleFk = sc.saleFk
|
||||||
JOIN tmp.newSaleList ns ON ns.orden = s.orden;
|
JOIN tNewSaleList ns ON ns.orden = s.orden;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.newSaleList;
|
DROP TEMPORARY TABLE IF EXISTS tNewSaleList;
|
||||||
robert marked this conversation as resolved
Outdated
|
|||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -3,14 +3,14 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_DelayTruck`(
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE done INT DEFAULT FALSE;
|
DECLARE done INT DEFAULT FALSE;
|
||||||
DECLARE vTicketFk INT;
|
DECLARE vTicketFk INT;
|
||||||
DECLARE cur1 CURSOR FOR SELECT ticketFk FROM tmp.ticket;
|
DECLARE cur1 CURSOR FOR SELECT ticketFk FROM tTicket;
|
||||||
|
|
||||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||||
|
|
||||||
CALL vn.productionControl(vWarehouserFk,0) ;
|
CALL vn.productionControl(vWarehouserFk,0) ;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticket;
|
DROP TEMPORARY TABLE IF EXISTS tTicket;
|
||||||
CREATE TEMPORARY TABLE tmp.ticket
|
CREATE TEMPORARY TABLE tTicket
|
||||||
SELECT ticketFk
|
SELECT ticketFk
|
||||||
FROM tmp.productionBuffer
|
FROM tmp.productionBuffer
|
||||||
JOIN alertLevel al ON al.code = 'FREE'
|
JOIN alertLevel al ON al.code = 'FREE'
|
||||||
|
@ -31,6 +31,6 @@ BEGIN
|
||||||
END LOOP;
|
END LOOP;
|
||||||
|
|
||||||
CLOSE cur1;
|
CLOSE cur1;
|
||||||
DROP TEMPORARY TABLE tmp.ticket, tmp.productionBuffer;
|
DROP TEMPORARY TABLE tTicket, tmp.productionBuffer;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
Loading…
Reference in New Issue
IF EXISTS