Subject Re: Import data from flat files
Author Fabrice Aeschbacher
--- In firebird-support@yahoogroups.com, Oleg Lebedev <oleg.lebedev@w.
..> wrote:
> Ok, great.
> I am wondering if there is a way to execute an SQL command through
some
> FB utiltity from a shell. Smth like:
> bash> time isql -c "SELECT count(*) FROM tableA" /tmp/mydb.fdb
>
> *************************************

Hi,

Put your SQL command into a command.sql file. This file must start
with:

SET NAMES ISO8859_1;
CONNECT 'host:/path/to/database.fdb'
USER 'SYSDBA'
PASSWORD 'masterkey';

Then try running isql with "-i" option:

$isql host:/path/to/database.fdb -u SYSDBA -p masterkey -o isql.out -m
-e -i command.sql

HTH,
Fabrice