开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜