Help with the Update command

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
mparak
Senior Boarder
Senior Boarder
Posts: 81
Joined: 12.09.2005, 06:51
Location: Durban South Africa
Contact:

Help with the Update command

Post by mparak »

Dear Friends


I am trying to update a value in one table with a value form a different table.

The update command seems to be the logical way. Can somebody help me with the SQL command that would update a single field from one table to another.

Update Table1, Table2
set table1.EndValue=Table2.somefield
where table1.indexfield=table2.indexfield.

I am working with Interbase, in this project, but the answer will help me in my work with MysqL as well..

Regards

MParak
Durban South Africa.
mparak
Senior Boarder
Senior Boarder
Posts: 81
Joined: 12.09.2005, 06:51
Location: Durban South Africa
Contact:

Post by mparak »

I have been able to do a multi table update, in MySQL, but the syntax is clearly different for Firebird.
Therein lies the problem.
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Yes, MySQL has some differences in syntax and in some cases whole SQL statemens.
Post Reply