Re: dbaccess, command line parameter
Posted in 2003
You can not do that.
But there is no reason why you should not be able to write a script for
what you want to do, e.g.
Simplest thing to do can be:
mydbaccess.sh
-------------------------
#!/bin/sh
ARG1=$1
ARG2=$2
dbaccess $ARG1 << EOF
select * from $ARG2 ;EOF
mydbaccess.sh database table
You can also 'cat' the file and modify its contents with arguments taken
from command line into shell script, save it as a sql file and call
dbaccess in the script. etc etc etc ...
Thanks and Regards,
Gaurav
"Mitja Udovc"
<mitja.udovc@mf.u To: informix-list@iiug.org
ni-lj.si> cc:
Sent by: Subject: dbaccess, command line parameter
owner-informix-li
st@iiug.org
12/05/03 07:09 AM
Please respond to
"Mitja Udovc"
Hello!
I would like to do following:
in sql script file test.sql is:
select * from $1
I would like to call this sql from command line and pass parameter into it.
like: cat test.sql|dbaccess db-test - .... ???parameter
Mitja
sending to informix-list