Pesky informational messages in dbaccess
Posted in 1997
Hi Family,
I must be missing something.
I would like to incorporate some SQL commands into a shell script. So
in my shell script, I have a sequence of code like:
dbaccess mydatabase - | grep-cmd <<%%
select blah blah...
... (more blah)
%%
This works, basically. However....
All I want to see the the seelcted data.
I do NOT want the column headings; hence, the grep command in the above
example(adequate for simple purposes).
I do NOT want the messages like "42 rows selected" and "database
selected", which go to stderr.
Easy solution which looks like it works:
dbaccess mydatabase - 2>/dev/null | grep-cmd <<%%
This sends all error messges down the oubliette and produces the data I
want to see. Unfortunately, if an error occurs, I won't see it either.
What I *really* need is an option to dbaccess that gives me the bloody
data, tells me about any errors but omits the pesky informational
messages I mentioned that I don't want to see.
Any ideas? Besides writing an ESQL/C program to peice together the SQL
at run time and using dynamic SQL from the SQL descriptor to display the
info I need.
Thanks.
--
-- Jake (In pursuit of undomesticated aquatic avians)
+----------------------------------------------------------+
|Aside from that, how did you enjoy the play, Mrs. Linclon?|
+----------------------------------------------------------+