Re: New engines lack character based tools
Posted in 1997
Use the standard UNIX command line syntax with dbaccess allowing it to read
from stdin as follows:
dbaccess <database> -
dbaccess will then prompt you for SQL. An EOF or interrupt will end the
session.
You may also use a HERE document as follows:
dbaccess <database> - << !!
select * from mytab;!!
quite simple huh?
kevin
Sujit Pal <spal@watson.den.csci.csc.com> wrote in article
<5f1ufs$l19@cssun.mathcs.emory.edu>...
> John
>
> Command line SQL tools are probably not included in the standard =
> Informix toolset because they are so very simple to write using Unix =
> shell scripts. Heres a one-liner that I use quite often:
>
> SQLtool.sh
> echo $1 | dbaccess $DBNAME
>
> If your DBNAME is not set, then you can replace it by a command line =
> argument.
>
> To use this tool, simply say:
>
> SQLtool.sh "select * from mytable where mycolumn =3D myvalue"
>
> As for your problem with Informix not giving you results in column =
> format, it will using this method if you specify few enough columns, =
> otherwise it will give you results in the row format.
>
> I would like to see your tool, however.
>
> HTH
>
> Sujit Pal
> ----------
> From: John Morgan[SMTP:mudshark@mindspring.com]
> Sent: Wednesday, February 26, 1997 6:16 AM
> To: informix-list@rmy.emory.edu
> Subject: Re: New engines lack character based tools
>
> Being a recent convert to Informix I was stunned to find that there is
> _NO_ command line SQL tool! All that is available is in dbaccess
> through some stupid menu driven interface! ACK! Both Oracle and
> Ingres (the dbs I have used for years) have a purely command driven
> interface which I find incredably usefull for diagnosing nasty
> database integrity problems. This is very annoying as the results of
> a previous query are always trashed every time I run a subsequent one
> and it refuses to understand even the simplest window size changes. I
> _like_ being able to make my x-window take the entire screen and see n
> rows in columnar format spreading _across_ the screen! If the lines
> wrap, I just re-issue the query with fewer fields or n times with few
> enough to fit, my choice if I don't want a wrap.
>
> Sorry, end of bitch.
>
> Anyway, I am now writing a tool for this, if anyone likes I will post
> the source to the group or on my web page when I am done.
>
> -john
> =20
>
>
>
>
>