Changes

Jump to navigation Jump to search
785 bytes added ,  16:52, 20 July 2017
FROM matcherportcoipo WHERE excludeflag1 = 0 AND excludeflag2 = 0 AND warningflag = 0;
--2313
We would like to add back all the data we can so let's have a look at the rows with multiple matches.
SELECT COUNT(*)
FROM matcherportcoipo WHERE excludeflag1 = 0 AND excludeflag2 = 0 AND warningflag = 1;
--66
Many of the duplicates have different issuedates so we'll just select the minimum issuedate for entries where the portcokey is matched twice.
DROP TABLE matcherportcoipomindate;
CREATE TABLE matcherportcoipomindate AS
SELECT file1coname, file1statecode, file1datefirstinv, MIN(file2issuedate)
FROM matcherportcoipo
WHERE excludeflag1 = 0 AND excludeflag2 = 0 AND warningflag = 1
GROUP BY file1coname, file1statecode, file1datefirstinv;
--37
Then we can create an include table and union this with the good matches to create a matcher core file for portco and ipos.
==Creating Stage Flags Table==

Navigation menu