Subject Re: [firebird-support] How to create automatically a .SQL file?
Author W O
Hello Ann

Thank you very much for your answer.

The databases are in location, the tables too, but without records yet, so
I need to populate them. It is not possible a full backup/restore from a
location to another because many tables has data and each location has its
own data. There are some tables with common data and those I need to have
in all the places.

Greetings.

Walter.








On Thu, Aug 29, 2013 at 2:35 PM, Ann Harrison <aharrison@...>wrote:

> **
>
>
> On Thu, Aug 29, 2013 at 1:16 PM, W O <sistemas2000profesional@...
> >wrote:
>
>
> >
> >
> > In a Firebird's datatabase I have a large table with thousands of
> records,
> > is there a simple way for send these records to a text file?
> >
> > My idea is to have a script with the "INSERT INTO" commands.
> >
> > Something like it:
> >
> > INSERT INTO MyTable(MyCol1, MyCol2, MyCol3) VALUES(1, 'Alicia', 444555);
> > INSERT INTO MyTable(MyCol1, MyCol2, MyCol3) VALUES(2, 'Beatriz', 654321);
> >
> > So, when I initialize the database in another location I can put all
> those
> > records into it using the INPUT command of ISQL.
> >
> >
> >
> That's the least efficient way to insert data - using a prepared statement
> that
> you activate and pass data to is much faster. Why not just backup the
> source
> and restore it to the new location? If you only want part of the data, you
> could
> write your data to an external file, then copy the external file to the
> empty database
> in the new location and move the data from the external to the internal
> table. Or
> use a tool that copies tables between databases.
>
> Good luck,
>
> Ann
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]