Changes

Jump to navigation Jump to search
1,044 bytes added ,  16:28, 28 July 2017
FROM fundbase1 WHERE undisclosedflag = 0;
--27097
==Name based matching firms to funds==
Get the firms and fund keys and also include the firmname from the fundbasecore table. Run these two files through the Matcher. Then manually flag the multiple matches. There are only ~50 of them. Then reimport to vcdb2.
DROP TABLE fundkeysandfirms;
CREATE TABLE fundkeysandfirms AS
SELECT fundname, firstinvdate, firmname
FROM fundbasecore;
--27097
\COPY fundkeysandfirms TO 'fundkeysandfirms.txt' WITH DELIMITER AS E'\t' HEADER NULL AS '' CSV
 
DROP TABLE firmkeys;
CREATE TABLE firmkeys AS
SELECT firmname, statecode, foundingdate
FROM firmbasecore;
\COPY firmkeys TO 'firmkeys.txt' WITH DELIMITER AS E'\t' HEADER NULL AS '' CSV
--14145
 
CREATE TABLE matcherfirmsfunds (
firmname varchar(100),
firmstatecode varchar(2),
firmfoundingdate date,
fundname varchar(100),
fundfirstinvdate date,
fundfirmname varchar(100),
excludeflag int,
excludeflagmaster int
);
\COPY matcherfirmsfunds FROM 'matcheroutputfundsfirms.txt' WITH DELIMITER AS E'\t' HEADER NULL AS '' CSV
--2364
==Cleaning roundline==

Navigation menu