Subject Re: [firebird-support] Export as insert statement
Author Milan Babuskov
Martijn Tonies wrote:
>>ther's a metod to export a query as insert statement?
>
> Only via third-party tools or components. Or write your
> own code for it.

Sorry I haven't followed thread from the start.

You can write:

SELECT 'insert into table (column_list) values (' ||
column1 || ',' || column2 ...etc || ');';

And then just use isql to put results of that select into a file.

Of course, be careful with non-numeric types. You have to enclode them
in ' like this:

SELECT 'insert into tab values (' '''|| char_column || ''', etc.

'' are needed to escape ' which you need in result.

HTH

--
Milan Babuskov
http://fbexport.sourceforge.net