refactor: refs #7398 Refactor and change ekt_scan #2494
|
@ -79,8 +79,6 @@ BEGIN
|
||||||
klo = vKlo
|
klo = vKlo
|
||||||
AND auction = vAuction
|
AND auction = vAuction
|
||||||
AND agj = vShortAgj
|
AND agj = vShortAgj
|
||||||
) OR (
|
|
||||||
klo = auction -- No se si se refiere a esto
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
ORDER BY agj DESC, fec DESC
|
ORDER BY agj DESC, fec DESC
|
||||||
|
@ -122,6 +120,17 @@ BEGIN
|
||||||
|
|
||||||
SELECT COUNT(*) FROM tmp.ekt INTO vIsFound;
|
SELECT COUNT(*) FROM tmp.ekt INTO vIsFound;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
-- Solo campo agj
|
||||||
|
IF NOT vIsFound THEN
|
||||||
|
INSERT INTO tmp.ekt
|
||||||
|
SELECT id
|
||||||
|
FROM ektRecent
|
||||||
|
WHERE agj = vShortAgj;
|
||||||
|
|
||||||
|
SELECT COUNT(*) FROM tmp.ekt INTO vIsFound;
|
||||||
|
END IF;
|
||||||
|
|
||||||
END CASE;
|
END CASE;
|
||||||
|
|
||||||
IF vIsFound THEN
|
IF vIsFound THEN
|
||||||
|
|
Loading…
Reference in New Issue