ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Madunic <haj...@imag.net>
Subject RE: How to insert CSV into SQL Server via ANT
Date Mon, 15 Oct 2007 12:52:00 GMT
Thanks for the idea,

I'll give that a try in the next couple of days and post the results.

Marijan (Mario) Madunic


Quoting RADEMAKERS Tanguy <Tanguy.RADEMAKERS@swift.com>:

> >-----Original Message-----
> >From: Mario Madunic [mailto:hajduk@imag.net] 
> >Sent: Saturday, October 13, 2007 3:39 PM
> >To: user@ant.apache.org
> >Subject: How to insert CSV into SQL Server via ANT
> >
> >
> >Hi I've been using the BCP command to do this via
> ><exec executable="bcp">
> >  <arg ..... myCSV.txt
> ></exec>
> >
> >Ran into a problem with this. I thought bcp was a standard 
> >install on PCs but it
> >is only installed with SQL Server or SQL Server Express. Is 
> >there an ANT task
> >that can do this?
> >
> >Marijan (Mario) Madunic 
> 
> Hello Mario,
> 
> You could use the <sql> task to run sql INSERT statements against your
> db (you still need to turn your CSV files into sql insert statements,
> but that shouldn't be too hard), but then the machine on which you are
> running will need the JDBC drivers for SQLserver, so not sure if that
> helps much.
> 
> Regards,
> /t 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message