Re: fisql or ssqldb or sqsh.....
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Keehan Mallon wrote: > I need to be able to issue something like: > > fisql -S $tdsname -U $user -P $password -Q $SQL Why not use a here-document: $ cat t.sql #! /bin/sh bsqldb -U$U -P$P -S$S <<SQL select type, xusertype, allownulls from systypes where variable = 1 SQL $ ./t.sql type xusertype allownulls ---- --------- ---------- 39 231 1 39 256 0 37 165 1 39 167 1 4 rows affected Adding a -C or -Q option to bsqldb wouldn't be hard, but reading from standard input is much more flexible. HTH. --jkl