Join the Stack Overflow Community
Stack Overflow is a community of 6.6 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I am trying to read a data from csv file to postgres table. I have two columns in table, but there are four fields in csv data file. I want to read only two specific columns from csv to table.

share|improve this question

Would you know how to do it if there were only those two columns in CSV file?

If yes, then the simplest solution is to transform the CSV prior to importing into Postgres.

share|improve this answer
    
i know how to so it if the no of columns are same in table and csv. BUt i wanted to know if there is any other faster method. – Amnesiac Sep 13 '15 at 20:58
    
Then probably the easiest way to proceed is for you to post the code you would use in that case, and someone will probably easily edit it to provide the customization you want. It's much easier than inventing such code from scratch, at least to me. – Veky Sep 13 '15 at 21:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.