[freetds] fisql

James K. Lowden jklowden at freetds.org
Sat May 16 15:56:35 EDT 2009


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
 



More information about the FreeTDS mailing list