Tags: client, database, hp-unix, informix, installed, mysql, oracle, query, run, setup, software, sql, successfully, system, unix-shell

Run SQL Query on Informix database from Unix-Shell

On Database » Informix

982 words with 2 Comments; publish: Wed, 12 Dec 2007 10:24:00 GMT; (250140.63, « »)

Hi,

I've an Client System ( HP-Unix ) and I've Informix Client Software installed on that.

The Informix Client is successfully setup with Informix Database Server.

I'm looking for a way to run an SQL Query on the Database server from the Client system.

Actually I want it in Unix Shell Script or something like that ... that make me able to run it from somewhere else ...

How it is possible ?

Regards,

All Comments

Leave a comment...

  • 2 Comments
    • You can

      - write a esql/c program... but i never do that...

      - Use a dbaccess (in a shell program)

      some examples:

      echo "select * from table_X" | dbaccess myDB ;

      dbaccess myDB Myselect.sql ;

      dbaccess myDB <<EOF

      select * from table_X

      EOF

      Read the dbaccess manual...

      http://www-306.ibm.com/software/data/informix/pubs/library/ids_100.html

      #1; Tue, 11 Dec 2007 19:18:00 GMT
    • I wrote from korn shell the following:

      echo "database mydb; select * from mytable" | isql -qr -

      #2; Tue, 11 Dec 2007 19:19:00 GMT