Subject Re: [Firebird-Java] UPDATE JOIN
Author Fidel Viegas
On Feb 10, 2008 6:21 AM, betoban2007 <betoban2007@...> wrote:

> hi, you know how do i for update a table with the field of other table?
> ej. in MS SQL SERVER i do it .
> UPDATE tbl_equipos
> SET tbl_equipos.radicada = tbl_radicadas.id_radicada
> FROM tbl_equipos INNER JOIN tbl_radicadas ON tbl_equipos.esn =
> tbl_radicadas.imei;
> In firebir me works well
> UPDATE tbl_equipos e
> SET tbl_equipos.radicada = (SELECT id_radicada FROM tbl_radicadas r
> WHERE e.esn = r.imei);
> But the truth seems to me somewhat inefficient.
> Does anyone know a better way to do this?

Claudio Valdemarra has some examples on how to get some efficiency
improvements using rdb$db_key in a stored procedure. Have a look at

Hope that helps.

All the best,