[Info-ingres] Ingres Terminal Monitor - Conditional Execution
Shelia White
srwhite at ppol.co.uk
Fri Oct 3 14:45:02 UTC 2014
Hello,
Is it possible to have a conditional execution in a Unix script which is
running Ingres Terminal monitor e.g.
#!/bin/csh
echo "Input parameter is $1"
sql dbname <<END
create a session table... \g
update session table... \g
select from table ...\g
if $1 ="UPDATE" then
update data_table from session.table
set field=new_field
where etc.
\g
end if;
END
So I only want to run the update part of my script if the input
parameter is set to UPDATE. I've tried various forms of this but can't
get it work. Is it even possible?
I suppose I can generate the script on the fly but that's a bit messy.
Thanks.
More information about the Info-ingres
mailing list