GEEK: shell script question
12-Dec-07
Suppose you want pass in a complex query to a command line sql interpreter from within a shell script. You can do so with a command like this:
sql92 < connect to db1 as LASTTRADES user eouser;
set format row;
select p.fundkey as fundkey,
max(t.closed) as last_trade
from mposition p, mtrade t
where p.primarykey=t.positionkey
and t.createdbycorporateaction=0
group by fundkey;
EOF
There’s a name for the syntax for the argument: <
But for the life of me, I can’t recall it, or find it on the web. Anyone know this off hand?