Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Import CSV and Columns
Wed, Apr 16 2014 10:08 AMPermanent Link

Kevin Koehne

I'm looking for the ability to import CSV files that don't have column names that match the column names of the destination table or may not a header and don't match the layout of the table. IMPORT TABLE allows for specifying which columns to retrieve from the CSV, but the column names need to match the destination.
Am I missing something in the documentation?
If not, would it be possible to add a new clause that could map a CSV column name (or position) to a destination field name?
I started writing code to do the mapping, build the INSERT statement, make sure the dates are the right format, etc... Just thought it would be nice to be able to use a built-in statement Smile
Wed, Apr 16 2014 11:41 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Kevin

>I'm looking for the ability to import CSV files that don't have column names that match the column names of the destination table or may not a header and don't match the layout of the table. IMPORT TABLE allows for specifying which columns to retrieve from the CSV, but the column names need to match the destination.
>Am I missing something in the documentation?
>If not, would it be possible to add a new clause that could map a CSV column name (or position) to a destination field name?
>I started writing code to do the mapping, build the INSERT statement, make sure the dates are the right format, etc... Just thought it would be nice to be able to use a built-in statement Smile

As you've spotted ElevateDB doesn't do that natively. Why not look at a third party component eg Mike Skolnik's import suite  (www.scalabium.com). Using it not only can you import CSV but also a slew of other formats (eg Excel). Good quality code and cheap.

Roy
Thu, Apr 17 2014 8:39 AMPermanent Link

Kevin Koehne

Thanks Roy. I'll take a look at that.
Image