Guest User

Untitled

a guest
Dec 5th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. copy "Schema".county_check_audit to '\NETWORK-HOSTNetworkFoldercounty_check.csv' delimiter ',' CSV HEADER;
  2.  
  3. import psycopg2
  4. connection = psycopg2.connect(database="db", user="postgres", password="password", host="NETWORK-HOST")
  5. cursor = connection.cursor()
  6. cursor.execute("copy "Schema".area_check_audit to '\\NETWORK-HOST\NetworkFolder\area_check.csv' delimiter ',' CSV HEADER;")
  7. connection.commit()
  8.  
  9. psycopg2.ProgrammingError: could not open file "\NETWORK-HOSTNetworkFolderarea_check.csv" for writing: Permission denied
Add Comment
Please, Sign In to add comment