in reply to Need help with inserting images to excel from db

Here is the command line :
northwind=# copy (SELECT encode("Photo", 'hex') from "Employees" where + "EmployeeID"=1) TO '/home/postgres/scripts/images/1.hex';