tags:

views:

130

answers:

3

Hi trying to acknowledge the best practice to update Insert data from A table A to Table B . I have ADOConnection1 Table Clientes and ADOConnection2 Table Q_Clientes Now i knead to update

ADOConnection1 Table Clientes \Q_Clientes has the same similar to Clientes only it´s in another Locacion i can call clientes.FieldByName('Localização').text := Q_Clientes.FieldByName('Localização').text; .......................................... .......................................... ..........................................

or is there a simple Way to update Table Clientes .

Thank´s

A: 

Do you want to synchronize tables or what?

Keeper
yes please thats the idea
re
A: 

you can do that in a query:

INSERT INTO TABLE1 
(SELECT * FROM TABLE2 T2 
LEFT OUTER JOIN TABLE1 T1 on T2.IDField = T1.IDField 
WHERE T1.SomeOtherField is null)
Leslie
A: 

Depending on what database you connect, you can something like UPDATE..FROM (SQL Server) or use a SP for that.

Fabricio Araujo