Skip to content

Instantly share code, notes, and snippets.

@ssaid
Created August 21, 2015 15:08
Show Gist options
  • Select an option

  • Save ssaid/fc76b99b1352c05de69d to your computer and use it in GitHub Desktop.

Select an option

Save ssaid/fc76b99b1352c05de69d to your computer and use it in GitHub Desktop.

Revisions

  1. ssaid created this gist Aug 21, 2015.
    9 changes: 9 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    ```
    COPY(SELECT rp.name AS Partner, rpa.name as Contact_Name, rpa.street, rpa.street2, rpa.city, rpa.zip, rcs.name as state, rc.name as country FROM res_partner_address rpa
    JOIN res_partner rp ON rpa.partner_id=rp.id
    JOIN res_country rc ON rpa.country_id=rc.id
    JOIN res_country_state rcs ON rpa.state_id=rcs.id
    WHERE rpa.type IS NULL AND rpa.active IS True
    ORDER BY rp.name)
    TO '/tmp/res_partner_address_type_null.csv' DELIMITER ',' CSV HEADER;
    ```