HenPlus is a SQL shell that can handle multiple sessions in parallel. The commandline interface with the usual history functions features TAB-completion for commands, tables and columns. Database connect via JDBC.
It would be of great help if there was a -silent or -s
option on the comand line like in SQLPlus that would
remove all the gratuitous output like the startup
output, the prompt and the timing so that it only
outputs the result of the query, nothing else.
I mainly need this so I can select a value from a
database column directly into a Unix environment
variable. This would be an example -
!/bin/sh
VALUE=henplus -silent user/password@instance <<END set-property sql-result-showheader off set-property sql-result-showfooter off set-property column-delimiter "" select max(c1) from t1; exit END
if [ -z "$VALUE" ]; then
echo "No rows returned from database"
exit 0
else
echo $VALUE
fi
It would be of great help if there was a -silent or -s option on the comand line like in SQLPlus that would remove all the gratuitous output like the startup output, the prompt and the timing so that it only outputs the result of the query, nothing else.
I mainly need this so I can select a value from a database column directly into a Unix environment variable. This would be an example -
!/bin/sh
VALUE=
henplus -silent user/password@instance <<END set-property sql-result-showheader off set-property sql-result-showfooter off set-property column-delimiter "" select max(c1) from t1; exit END
if [ -z "$VALUE" ]; then echo "No rows returned from database" exit 0 else echo $VALUE fi