Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent feature similar to SQLPlus #11

Open
tbk303 opened this issue Dec 30, 2010 · 0 comments
Open

Silent feature similar to SQLPlus #11

tbk303 opened this issue Dec 30, 2010 · 0 comments

Comments

@tbk303
Copy link
Collaborator

tbk303 commented Dec 30, 2010

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant