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