freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: Keehan Mallon <keehan_mallon AT yahoo.com>, FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] fisql or ssqldb or sqsh.....
- Date: Wed, 20 May 2009 01:17:14 -0400
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
-
[freetds] fisql or ssqldb or sqsh.....,
Keehan Mallon, 05/18/2009
-
Re: [freetds] fisql or ssqldb or sqsh.....,
James K. Lowden, 05/20/2009
- Re: [freetds] fisql or ssqldb or sqsh....., Keehan Mallon, 05/20/2009
-
Re: [freetds] fisql or ssqldb or sqsh.....,
James K. Lowden, 05/20/2009
Archive powered by MHonArc 2.6.24.