You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Glenn Ambrose <gl...@hotmail.com> on 2010/02/08 12:19:21 UTC
import with column
Hi
Does 'CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE(...);' handle column names? I've noticed that when the database that we use 'Agrobase' exports to .csv it always adds the column names to the top of the row.
What's the best way of handling this as I can't see any any provisions for this in the above procedure.
Thanks
Glenn
_________________________________________________________________
Search for properties that match your lifestyle! Start searching NOW!
http://clk.atdmt.com/NMN/go/157631292/direct/01/
Re: import with column
Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Glenn,
Derby doesn't understand the format you're describing. You can write a
table function which reads the csv file and strips the column names.
Then you can import the file like this:
insert into myTable select * from table ( myTableFunction(...) ) s
However, with this solution you will lose some of the speed of the
import procedures because logging won't be turned off.
Hope this helps,
-Rick
Glenn Ambrose wrote:
> Hi
>
> Does 'CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE(...);' handle column names?
> I've noticed that when the database that we use 'Agrobase' exports to
> .csv it always adds the column names to the top of the row.
>
> What's the best way of handling this as I can't see any any provisions
> for this in the above procedure.
>
> Thanks
> Glenn
>
> Start searching NOW! Search for properties that match your lifestyle!
> <http://clk.atdmt.com/NMN/go/157631292/direct/01/>