Subject | Re: [firebird-support] Export as insert statement |
---|---|
Author | Helen Borrie |
Post date | 2004-02-20T08:32:07Z |
At 03:35 PM 19/02/2004 +0000, you wrote:
Do you mean "use an insert query to export data"?
If so, look at
create table extTable EXTERNAL FILE '/path/to/your/file.txt'
as
field1 char(10),
field2 char(20),
...
);
This creates an external file that you can insert fixed-length text records
to. You can use CAST() to convert non-character types to strings of
appropriate size.
insert into extTable(field1, field2....)
select
cast(f1 as char(10)),
cast(f2 as char(20)),
cast(......
from AnotherTable
where...
order by...
/heLen
>Hi,It's not clear quite what you mean by this.
>
>ther's a metod to export a query as insert statement?
Do you mean "use an insert query to export data"?
If so, look at
create table extTable EXTERNAL FILE '/path/to/your/file.txt'
as
field1 char(10),
field2 char(20),
...
);
This creates an external file that you can insert fixed-length text records
to. You can use CAST() to convert non-character types to strings of
appropriate size.
insert into extTable(field1, field2....)
select
cast(f1 as char(10)),
cast(f2 as char(20)),
cast(......
from AnotherTable
where...
order by...
/heLen