Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Importa os dados da base origem para a destino
- EXECUTE ibeblock
- AS
- BEGIN
- CREATE connection BaseOrigem dbname 'c:\Bancos\Origem\BASE.FDB' password 'masterkey' USER 'SYSDBA' clientlib 'fbclient.dll';
- CREATE connection BaseDestino dbname 'c:\Bancos\Destino\BASE.FDB' password 'masterkey' USER 'SYSDBA' clientlib 'fbclient.dll';
- USE BaseOrigem;
- FOR
- SELECT
- C.Codigo,
- C.Nome
- CIDADE C
- INTO :vCodigo, :vNome
- do BEGIN
- USE BaseDestino;
- INSERT INTO CIDADE(Codigo,Nome) VALUES (:vCodigo, :Nome);
- END
- USE BaseDestino;
- commit;
- close connection BaseOrigem;
- close connection BaseDestino;
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement