Skip to content

Commit

Permalink
Make sure that company sic_code is defined and unique
Browse files Browse the repository at this point in the history
  • Loading branch information
ylavoie committed Jan 5, 2021
1 parent 8d316a3 commit e0d96f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/changes/1.9/company-strict-sic.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


insert into sic (code, description)
select sic_code, sic_code from company
select distinct sic_code, sic_code from company
where not exists (select 1 from sic where sic.code = company.sic_code)
and sic_code is not null;

Expand Down

0 comments on commit e0d96f4

Please sign in to comment.