Re: Piping sql script into isql
Posted in 1992
Path: emory!europa.asd.contel.com!uunet!gossip.pyramid.com!pyramid!infmx!news
From: cortesi@informix.com (David Cortesi)
Newsgroups: comp.databases.informix
Message-ID: <1992Jan13.181643.13060@informix.com>
Date: 13 Jan 92 18:16:43 GMT
References: <752@bellahs.UUCP>
Sender: news@informix.com (Usenet News)
Reply-To: cortesi@informix.com
Organization: Informix Software, Inc.
In article <752@bellahs.UUCP> jjamison@bellahs.UUCP (John Jamison) writes:
> I am told there is an undocumented flag for isql that
> allows you to pipe in an sql script into isql. It
> works either by | isql -<flag> or isqli -<flag> inputfile.
>
This ought to be in Appendix I of the ISQL manual but isn't.
The magic command is: isql - -
The first hyphen is the database argument, you could give a database name.
The second hyphen says, read stdin. A dumb example would be:
isql stores - <<eot!
select * from systables where tabid > 99; eot!
Comparable would be
isql - - <<ZZZ
database stores;
select fname, lname from customer
where customer_num > 100
order by fname
ZZZ