Re: Informix query
Posted in 2000
For larger queries you can put the text into a file and cat the file contents
through dbaccess:
cat $SQL_FILE | dbaccess <database name>
The echo method works just as well, but can be messy if the SQL statement is
really long. Its advantage is that you do not have another file to maintain,
you just have to do some work formatting the SQL in the script so that it is
readable. It is just a matter of style.
Keep in mind that if the script fails, dbaccess will perform an implicit
rollback of any work that was performed. You need to check return codes to
ensure that the script performed as advertised.
SC
> How can I execute Informix query from unixware script?
> I work with Informix Online 7.30 under Sco Unixware 7.0.
>
> I used the sacego utility with Informix online 7.30 under Digital Unix 4.0,
> but this utility doesn't exist in Unixware.
>
> thanks in advance
>
> Marco Meoni