[freetds] fisql or ssqldb or sqsh.....
keehan_mallon at yahoo.com
Wed May 20 14:04:11 EDT 2009
I just finished changing our code to work using bsqldb with the -i, -o, -e syntax. I would have used the here-doc syntax if I thought it was supported. I looked at the man page, but didn't understand that here-doc style was an option. I guess I should have got that from the statement that bsqldb is a filter and can use standard input, output and error.
Thanks for the reply. It seems like a very easy to use utility. It is very nice that the FreeTDS utilities are so compatible with the MS utilities. I have now ported bcp to freebcp and osql to bsqldb.
From: James K. Lowden <jklowden at freetds.org>
To: Keehan Mallon <keehan_mallon at yahoo.com>; FreeTDS Development Group <freetds at lists.ibiblio.org>
Sent: Tuesday, May 19, 2009 10:17:14 PM
Subject: Re: [freetds] fisql or ssqldb or sqsh.....
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
bsqldb -U$U -P$P -S$S <<SQL
select type, xusertype, allownulls
where variable = 1
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.
More information about the FreeTDS