Re: output-format of select in sysdatabases
Posted in 2008
Andrew Ford — — source: Usenet: comp.databases.informix
>
> You can use the concatenate operator like so:
>
> echo "select trim(name) || ' ' || is_buff_log from sysdatabases \\
> where name not in ('sysmaster','sysutils','stores_demo', \\
> 'sysuser') order by name;" | dbaccess sysmaster
>
>
Uh and I guess you can also use the "output to pipe cat without headings" to
get rid of the column headings, redirect stderr to /dev/null to get rid of
the X rows returned stuff and also grep out the empty lines
echo "output to pipe cat without headings select trim(name) || ' ' ||
is_buff_log from sysdatabases \\
where name not in ('sysmaster','sysutils','stores_demo', \\
'sysuser') order by name;" | dbaccess sysmaster 2>/dev/null | grep -v "^$"