Invalid Input Syntax for Type Date

Xkid

I'm triying to load data to PosgreSQL Data Base remotly by command Line in CMD, copying data from CSV file to a specific Table. It was working well but, somehow when I try to load data now, CMD throws me this error

enter image description here

Curiously CSV file has the "fecha_carga" field in date type as well is in the table storage in Data Base in this way, here is my try:

psql -h suggestedorder.postgres.database.azure.com -d DataAnalytics -U dev_ext@suggestedorder -c "TRUNCATE planning.env_cat_bloqueados" -c "\copy planning.env_cat_bloqueados (key, bloqueado, fecha_carga)from 'C:\Users\geradiaz.MODELO\Desktop\Envase\Catalogos\Outputs_Catalogos\Catalogo_Bloqueados\Catalogo_Bloqueados_Output.csv'with delimiter as ','

Can someone explain me what is happening here? and how could I fixed it up?

Best regards and thanks!

Xkid

The @Adrian Klaver comment gave me the idea what was wrong with my command line, in effect the fields on my CSV file was taking as data, so I changed the command line specifying that my CSV file has headers by using the next instruction at the end instead with delimiter as ',' :

with (format csv, header) 

So, this is the whole command line:

psql -h suggestedorder.postgres.database.azure.com -d DataAnalytics -U dev_ext@suggestedorder -c "TRUNCATE planning.env_cat_bloqueados" -c "\copy planning.env_cat_bloqueados (key, bloqueado, fecha_carga)from 'C:\Users\geradiaz.MODELO\Desktop\Envase\Catalogos\Outputs_Catalogos\Catalogo_Bloqueados\Catalogo_Bloqueados_Output.csv'with (format csv, header)

Thanks!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Invalid input syntax for type date: "\N" in postgresql when fetching data

From Dev

ActiveRecord::StatementInvalid (PG::InvalidDatetimeFormat: ERROR: invalid input syntax for type date: ""

From Dev

Invalid input syntax for type interval

From Dev

PostgreSQL - Error: "invalid input syntax for type bytea"

From Dev

"invalid input syntax for type numeric" for entering "emptyness"

From Dev

Invalid input syntax for type double precision

From Dev

rails postgres ERROR: invalid input syntax for type double precision

From Dev

Postgres COPY FROM Fails With invalid input syntax for type timestamp

From Dev

rails postgres ERROR: invalid input syntax for type double precision

From Dev

pg nodejs package results in 'invalid input syntax for type json'

From Dev

How to solve invalid input syntax for type double precision

From Dev

Error: invalid input syntax for integer: ""

From Dev

Error: invalid input syntax for integer: ""

From Dev

Invalid input syntax PLPGSQL script

From Dev

invalid input syntax for integer (string)

From Dev

'Invalid input syntax for type inet' db error in Django app with postgres and Gunicorn+Nginx as reverse proxy

From Dev

Limit a date in input type date

From Dev

Input type="date" thymeleaf

From Dev

Input type="date" thymeleaf

From Dev

pq: invalid input syntax for integer: "$1"

From Dev

DataError: (DataError) invalid input syntax for integer: "None"

From Dev

"invalid input syntax for integer" when input is actually a string

From Dev

AngularJS directive to prevent input of invalid date

From Dev

input type=date in iOS 7

From Dev

Styling input[type=date] in chrome

From Dev

HTML input type=date weekdays

From Dev

Styling input[type=date] in chrome

From Dev

HTML input type=date weekdays

From Dev

Why does DateTime.parse not recognize this invalid input as an invalid date?

Related Related

  1. 1

    Invalid input syntax for type date: "\N" in postgresql when fetching data

  2. 2

    ActiveRecord::StatementInvalid (PG::InvalidDatetimeFormat: ERROR: invalid input syntax for type date: ""

  3. 3

    Invalid input syntax for type interval

  4. 4

    PostgreSQL - Error: "invalid input syntax for type bytea"

  5. 5

    "invalid input syntax for type numeric" for entering "emptyness"

  6. 6

    Invalid input syntax for type double precision

  7. 7

    rails postgres ERROR: invalid input syntax for type double precision

  8. 8

    Postgres COPY FROM Fails With invalid input syntax for type timestamp

  9. 9

    rails postgres ERROR: invalid input syntax for type double precision

  10. 10

    pg nodejs package results in 'invalid input syntax for type json'

  11. 11

    How to solve invalid input syntax for type double precision

  12. 12

    Error: invalid input syntax for integer: ""

  13. 13

    Error: invalid input syntax for integer: ""

  14. 14

    Invalid input syntax PLPGSQL script

  15. 15

    invalid input syntax for integer (string)

  16. 16

    'Invalid input syntax for type inet' db error in Django app with postgres and Gunicorn+Nginx as reverse proxy

  17. 17

    Limit a date in input type date

  18. 18

    Input type="date" thymeleaf

  19. 19

    Input type="date" thymeleaf

  20. 20

    pq: invalid input syntax for integer: "$1"

  21. 21

    DataError: (DataError) invalid input syntax for integer: "None"

  22. 22

    "invalid input syntax for integer" when input is actually a string

  23. 23

    AngularJS directive to prevent input of invalid date

  24. 24

    input type=date in iOS 7

  25. 25

    Styling input[type=date] in chrome

  26. 26

    HTML input type=date weekdays

  27. 27

    Styling input[type=date] in chrome

  28. 28

    HTML input type=date weekdays

  29. 29

    Why does DateTime.parse not recognize this invalid input as an invalid date?

HotTag

Archive