E:/McNair/Projects/PatentAddress/Functions.sql
All the cleaned cities for U.S. patents are stored in ptoassigneend_us_citycleanedptoassigneend_us_cleaned. (# 3572605see feature city_cleaned) =====Output (Table)===== ptoassigneend_us_cleaned Table "public.ptoassigneend_us_cleaned" Column | Type | Modifiers---------------------+------------------------+----------- reelno | integer | frameno | integer | name | character varying(500) | addrline1 | character varying(500) | addrline2 | character varying(500) | city | character varying(500) | state | character varying(500) | country | character varying(500) | postcode | character varying(80) | postcode_addr1 | text | postcode_addr2 | text | postcode_city | text | state_addr1 | text | state_addr2 | text | state_city | text | city_addr1 | text | city_addr2 | text | city_city | text | postcode_cleaned | text | postcode_f5_cleaned | text | state_cleaned | text | city_cleaned | text | Feature postcode_cleaned, postcode_f5_cleaned (first five digits), state_cleaned and city_cleaned are cleaned postcode, state and city info.
====Functions to Simplify SQL Code====