Re: problems importing from csv

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: problems importing from csv
Дата
Msg-id 2241df47-10a0-1ab4-2891-f0ecf083586b@aklaver.com
обсуждение исходный текст
Ответ на problems importing from csv  (stan <stanb@panix.com>)
Ответы Re: problems importing from csv
Список pgsql-general
On 9/13/19 11:22 AM, stan wrote:
> 
> I am trying to import some data from spreadsheets. Included in the data

What program?

Usually there is an option to save the raw values not the formatted 
ones. In LibreOffice you uncheck the Save content as shown option.

> 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?
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: PG SQL and LIKE clause
Следующее
От: John W Higgins
Дата:
Сообщение: Re: PG SQL and LIKE clause