1

Topic: nisql

And now advertizing!
You should make the report and to send it in Excel? You should do it regularly under the schedule? You have very-difficult SQL a script producing some separate labels and standard account systems do not allow to process some results for time? To you simply to draw laziness reports in GUI and to select fonts and colors? You are tormented by a question: what for to do titles in header if already there are names of columns?
Then nisql - your choice!
nisql works through ODBC and  that at you already is adjusted DSN...
In the most primitive variant nisql can work so:

 nisql DSN=MyDB TableA out.txt 

Or so:

 nisql DSN=MyDB "select a.f1, b.f2 from TableA a, TableB b where a.pk=b.fk" out.csv 

Or even so:

 nisql "DSN=MyDB; UID=jim; PWD=123" script-with-three-outputs.sql out.xml-f "ROOT=report;SETS=rawdata,firstAggregate,secondAggregate" 

That allows to create three-section XML, and each of three results of a sql-script will lie in the section.
And if you do not know in advance how many results produces a script, too it doesn't matter:

 nisql DSN=MyDB mystery-script.sql out.csv-f "HDR=yes" 

And you receive out.csv, out_1.csv, out_2.csv.... And so on, how many select would be in a script. Similarly there are also additional sections in XML.
nisql it is tested in AIX, RHEL, Windows and Linux Mint.
At the expense of usage ODBC, nisql from Oracle, SAP Sybase ASE, MS a SQL Server and MySQL successfully works. Though there also it is necessary to consider singularities ODBC of drivers.
To take here: https://github.com/White-Owl/nisql
Sentences on improving and reports on bugs are welcomed. Testing in other OS and with others RDBMS are extremely desirable.