Skip to Content.
Sympa Menu

freetds - Re: [freetds] fisql

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] fisql
  • Date: Sat, 16 May 2009 15:56:35 -0400

Gennady Vayl wrote:
>
> Is there a good instruction page for fisql. I realize you can do a man
> on it in Unix, but I was wondering for the -i input file what kind of
> input file it requires. Also I login and get prompts like >>1.
> Can I execute queries at this prompt?

fisql is like most interactive-SQL tools. It's similar tsqsl, to the isql
from Microsoft and Sybase, to the isql from unixODBC, and to sqsh.

No, there's no instruction page. You simply type your query at the
prompt. It can use multiple lines. After the last line, press <return>,
and type "go" (without the quotes, but you knew that) by itself on a line,
then <return> again. "go" is said to be the "batch terminator"; fisql
looks for it to know where your query ends. Then it sends your query to
the server and prints any response.

The -i option is simply a way to send pre-existing SQL to the server
instead. The file should contain SQL. It may have several batches
(separated by "go" lines), and should end with "go".

A "command batch" is an odd concept. Mostly it doesn't matter, but for
instance variables exist only within a batch and CREATE PROCEDURES
statement cannot be combined with other statements in a single batch.

HTH.

--jkl





Archive powered by MHonArc 2.6.24.

Top of Page