Skip to content
Snippets Groups Projects
Commit bbc5caef authored by Marcelo Lacerda's avatar Marcelo Lacerda
Browse files

Fixed regression where invalid entries where inserted in the inventory

parent 083487d6
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,8 @@ BEGIN
s.disk2_model = d.disk2_model AND
s.disk2_size >= d.disk2_size * 0.9 AND
s.disk2_size <= d.disk2_size * 1.1 AND
s.disk2_used = d.disk2_used) LOOP
s.disk2_used = d.disk2_used)
WHERE valid = '1' LOOP
-- IF .... THEN
......
......@@ -16,7 +16,7 @@ BEGIN
--
INSERT INTO fact_contact (sch_id, cit_id, dat_id, macaddr)
(SELECT sch_id, cit_id, contact_date, macaddr::macaddr FROM sa_inventory)
(SELECT sch_id, cit_id, contact_date, macaddr::macaddr FROM sa_inventory WHERE valid = '1')
EXCEPT
(SELECT sch_id, cit_id, dat_id, macaddr FROM fact_contact WHERE dat_id >= result.min_date AND dat_id <= result.max_date);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment