I'm using Firebird's isql.exe
tool to query an existing database:
isql -u <username> -p <password> <database> -i <file.sql> -o <output.txt>
which reads my SQL statements from file.sql
and saves the results to output.txt
.
But is there a way to feed the SQL statements into isql
via command line, and not from a file?
This is because I actually plan to execute the command above in my .exe installer script (via ExecWait
of NSIS Installer).
Also, is there a way to format the output such that only the actual info needed are returned? Currently the output's first line contains the column names, second line a bunch of "====" as separator, third line the actual info, with an arbitrary number of spaces in between each column. This output format makes it hard for me to use in my script.