Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Douglas Wilson — — source: Informix-list mailing list archive (1991-1998)
Art S. Kagel wrote:
>
> phil@oyster.co.uk wrote:
> >
> > I have 2 questions:
> >
> > (1) How do I run an SQL query from the Unix shell? In the
> > FAQ it talks about running isql, but this doesn't seem to
> > be on my system. Is isql part of OnLine or does it only
> > come with the other Informix database?
> dbaccess mydatabase - <myscript.sql
or even:
echo "select stuff from mytable" | dbaccess mydatabase -
> > (2) I have a table which includes a row of strings which
> > are in all upper case. I want to output the result in mixed
> > case with the 1st character of every word capitalised, and
> > the other characters in lower case. Is it possible to do
> > this in SQL?
Check out:
http://www.wollery.demon.co.uk
You'll find 3 different sed scripts to capitalize the first
character of every word. If you're doing SQL from the Unix shell
this may suit your needs.
Douglas Wilson
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.