Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I have a issue when I migrate table from one database to another database table. I am using PostgreSQL database.
The issue:
SQL error:
ERROR: invalid input syntax for type timestamp: "31:57.7"
LINE 2: VALUES ('52','GUIDO Layouts','','f','47','31:57.7','34:...
In statement:
INSERT INTO "public"."projects" ("id","name","description","public","parent_id","created_at","updated_at","identifier","lft","rgt","templated","active")
VALUES ('52','GUIDO Layouts','','f','47','31:57.7','34:31.5','guido-layouts','81','82','f','t')
I checked both table structure are same. both column(create_at) using timestamp without time zone
and I tried using now()
please help me
timestamp is a datetime so you need a date component to make it work with a timestamp field. You can use it as a time, so:
'31:57.7'::time 00:31:57.7.
You have two choices:
If you want to stick with using just time, change the column type to time.
Keep the timestamp type and change the value to a timestamp(datetime).
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.