0

I have a text file which contains val1

And my table in PostgesSql is in format

val1 | val2 | val3 | ...

Edited : When I tried writing the command from here, Following error is shown.

Thanks in advance.

9
  • stackoverflow.com/questions/5233321/… Commented Feb 16, 2020 at 13:47
  • An error is thrown. I edited the post and it is elaborated their. Commented Feb 16, 2020 at 15:29
  • What do you not understand about relation "mytable" does not exist ? It does mean that you will have to create the table in postgresql yourself, before trying to import data. Commented Feb 16, 2020 at 15:34
  • After that, I can then write this command and follow that link? Commented Feb 16, 2020 at 15:48
  • Maybe look at this link, it works better: stackoverflow.com/questions/60250167/… (only change tablename, and you use different delimiter...) Commented Feb 16, 2020 at 15:54

1 Answer 1

0

There is a drop option in a table, there import the .txt file in the drop-down options with corresponding column name. Later refresh the table, then view it. Walah, you got table exactly as your .txt file. Thank You.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.