Changes

Jump to navigation Jump to search
no edit summary
FROM companybase;
\COPY companybase1 TO 'companybase1.txt' WITH DELIMITER AS E'\t' HEADER NULL AS '' CSV;
 
==Checking if pkey is valid ==
The following psql code creates a new table called companybasepkeyvalid that counts the number of times the pkey created in companybase1 occurs in companybase1. In this case there are 3 pkeys that are not vald for companies: Undisclosed Company, New York Digital Health LLC and Undisclosed Company.
CREATE TABLE companybasepkeyvalid AS
SELECT coname, pkey, COUNT(pkey)
FROM companybase1
GROUP BY coname, pkey;
--44771
\COPY companybasepkeyvalid TO 'companybasepkeyvalid.txt' WITH DELIMITER AS E'\t' HEADER NULL AS '' CSV;

Navigation menu