Best Practice append, Insert into Table . Queries
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
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)
Depending on what database you connect, you can something like UPDATE..FROM (SQL Server) or use a SP for that.
精彩评论