>Yeah both BCP and sqlcmd are reall fast and work well EXCEPT they both have
>a limit on the length of the arguments you can use at the command prompt. If
>not for that I would be done. I guess I am going to have to look at SSIS.
>All I need to do is pass a query and export the data from that query to a
>csv file in my user specific directory. Seems easy, hopefully it is in SSIS.
>
>Jeremy


Jeremy, just a thought...

What if you put your lengthier parameters as batch file variables and pass them 
in on the call to the batch file itself? For example, the line to call the 
batch file would be...
myBCPbatch.bat myfirstlongparameter mysecondlongparameter mythirdlongparameter 
myfourthlongparameter

Then within the myBCPbatch.bat file, the line to run the bcp would be something 
like 

BCP pubs.dbo.sales in %1 -f\%2 -e\%3 -U... -P... -S%4 

I didn't do any experimentation with it, but just wondering.

Also, is it possible to put the BCP parameters in an external file and then 
reference it from the bcp command line, rather than type out all of the 
arguments?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237178
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to