Subject | Re: [Firebird-Java] UPDATE JOIN |
---|---|
Author | Fidel Viegas |
Post date | 2008-02-10T10:50:12Z |
On Feb 10, 2008 6:21 AM, betoban2007 <betoban2007@...> wrote:
improvements using rdb$db_key in a stored procedure. Have a look at
http://www.cvalde.net/document/mysteriousDbKeyI.htm
Hope that helps.
All the best,
Fidel.
> hi, you know how do i for update a table with the field of other table?Claudio Valdemarra has some examples on how to get some efficiency
>
> 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?
improvements using rdb$db_key in a stored procedure. Have a look at
http://www.cvalde.net/document/mysteriousDbKeyI.htm
Hope that helps.
All the best,
Fidel.