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
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 ?
Leave a comment...
- 2 Comments
- You can
- write a esql/c program... but i never do that...
- Use a dbaccess (in a shell program)
echo "select * from table_X" | dbaccess myDB ;
dbaccess myDB Myselect.sql ;
dbaccess myDB <<EOF
select * from table_X
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