feat: refs #5855 drop temporary table #2040

Merged
robert merged 21 commits from 5855-temporaryTable into dev 2024-07-02 11:12:30 +00:00
3 changed files with 9 additions and 10 deletions
Showing only changes of commit 0128dfd967 - Show all commits

View File

@ -484,8 +484,7 @@ proc: BEGIN
DROP TEMPORARY TABLE
edi.offer,
itemToInsert,
tmp.buyRecalc;
itemToInsert;
SET @isTriggerDisabled = FALSE;

View File

@ -16,9 +16,9 @@ BEGIN
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
FROM vn.sale
WHERE ticketFk = vTargetTicketFk
@ -28,8 +28,8 @@ BEGIN
SELECT ns.saleFk, sc.componentFk, sc.value
FROM vn.saleComponent sc
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

IF EXISTS

IF EXISTS
END$$
DELIMITER ;

View File

@ -3,14 +3,14 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_DelayTruck`(
BEGIN
DECLARE done INT DEFAULT FALSE;
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;
CALL vn.productionControl(vWarehouserFk,0) ;
DROP TEMPORARY TABLE IF EXISTS tmp.ticket;
CREATE TEMPORARY TABLE tmp.ticket
DROP TEMPORARY TABLE IF EXISTS tTicket;
CREATE TEMPORARY TABLE tTicket
SELECT ticketFk
FROM tmp.productionBuffer
JOIN alertLevel al ON al.code = 'FREE'
@ -31,6 +31,6 @@ BEGIN
END LOOP;
CLOSE cur1;
DROP TEMPORARY TABLE tmp.ticket, tmp.productionBuffer;
DROP TEMPORARY TABLE tTicket, tmp.productionBuffer;
END$$
DELIMITER ;