On Tue, Nov 21, 2017 at 4:12 PM, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] <firebird-support@yahoogroups.com> wrote:
> 21.11.2017 10:01, LtColRDSChauhan rdsc1...@gmail.com [firebird-support] > wrote: > > How can I copy all records of a table to another table in different > database. The tables > > having same design. > > Use "execute statement on external datasource". > > Thanks SD. Please see if the under mentioned procedure is good enough: SET TERM ^ ; ALTER PROCEDURE COPY_theTABLE AS declare variable FIELD_1 varchar(80); declare variable FIELD_2 varchar(80); BEGIN for select p.FIELD_1, p.FIELD_2 from the_TABLE into :FIELD_1, :FIELD_2 do execute statement ('insert into the_TABLE values(?)') (:FIELD_1, :FIELD_2) ON EXTERNAL 'ExternalServer:C:\External_Target.FDB' AS USER 'SYSDBA' PASSWORD 'masterkey'; END^ SET TERM ; ^ > -- > WBR, SD. > > > ------------------------------------ > > ------------------------------------ > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > Visit http://www.firebirdsql.org and click the Documentation item > on the main (top) menu. Try FAQ and other links from the left-side menu > there. > > Also search the knowledgebases at http://www.ibphoenix.com/ > resources/documents/ > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > ------------------------------------ > > Yahoo Groups Links > > > >