Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8qD7-0002mh-KV for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2019 18:22:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i8qD6-00026p-3h for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2019 18:22:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8qD5-00026Z-OG for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2019 18:22:19 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i8qD3-0003av-91 for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2019 18:22:18 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 46VPB016RPz1Vy0 for ; Fri, 13 Sep 2019 14:22:16 -0400 (EDT) Received: by panix2.panix.com (Postfix, from userid 17622) id 46VP9z72MKz1ZVT; Fri, 13 Sep 2019 14:22:15 -0400 (EDT) Date: Fri, 13 Sep 2019 14:22:15 -0400 From: stan To: pgsql-general@lists.postgresql.org Subject: problems importing from csv Message-ID: <20190913182215.GB4142@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: gVim User-Agent: Mutt/1.12.1 (2019-06-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I am trying to import some data from spreadsheets. Included in the data sets are US monetary values. These appear in the CSV file, like this: $1.00 The column is defined like this: NUMERIC(5,2) NOT NULL. When I try to import this data using the \copy functionality, i get the following error; stan@smokey:~/pm_db/live_data$ psql < import_employee.sql ERROR: invalid input syntax for type numeric: "$1.00" CONTEXT: COPY employee, line 2, column hourly_rate: "$1.00" How can I work around this? -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin