Re: [SQL] SQL copy from csv with explicit field ordering

2001-03-02 Thread Peter Eisentraut
Terry Fielder writes: > Is there somewhere that I can either enable the first line of CSV as > header names > > OR > > Can I explicitly define my import field ordering from within the select > statement? No and no. You will have to preprocess your file. Something like this will probably do: #

[SQL] SQL copy from csv with explicit field ordering

2001-03-02 Thread Terry Fielder
I guess this is really a SQL question: I have a csv that I want to import, but the csv has different column ordering. I have tried putting the column names in the first row, but then the copy command fails on field which is data type (eg it is seeing the cells in first row as data, not header in