Connect to ODBC and export data as CSV?
Most scripting languages should be able to do this e.g. python, perl, tcl, 

Python does this with 


AN odbc pachkage - see Python wiki 
csv package in the
standard library