Subject | Re: [Firebird-Java] UPDATE JOIN |
---|---|
Author | Fidel Viegas |
Post date | 2008-02-10T10:53:14Z |
I have just noticed that you posted this to the wrong discussion
group. You should have reported this to firebird-support.
Next time, please do post your topics to firebird-support. This one is
for connecting to Firebird using Java.
All the best,
Fidel.
group. You should have reported this to firebird-support.
Next time, please do post your topics to firebird-support. This one is
for connecting to Firebird using Java.
All the best,
Fidel.
On Sun, Feb 10, 2008 at 11:50 AM, Fidel Viegas <fidel.viegas@...> wrote:
> 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
> http://www.cvalde.net/document/mysteriousDbKeyI.htm
>
> Hope that helps.
>
> All the best,
>
> Fidel.
>