Thx everybody.
Regards
Sebastien
> -Message d'origine-
> De : Erik Jones [mailto:[EMAIL PROTECTED]
> Envoyé : jeudi 25 octobre 2007 16:35
> À : Sébastien Meudec
> Cc : 'Christian Kindler'; pgsql-sql@postgresql.org
> Objet : Re: [SQL] get only rows for latest
ec
Cc : pgsql-sql@postgresql.org
Objet : Re: [SQL] get only rows for latest version of contents
Hi!
not quick mut works
select * from business b1
where b1.version_no = (SELECT max(version_no) FROM business b2.
where b2.idnode = b1.idnode
)
If you wa
.org
> Objet : Re: [SQL] get only rows for latest version of contents
>
> Hi!
>
> not quick mut works
>
> select * from business b1
> where b1.version_no = (SELECT max(version_no) FROM business b2.
> where b2.idnode = b1.idnode
>
Hi!
not quick mut works
select * from business b1
where b1.version_no = (SELECT max(version_no) FROM business b2.
where b2.idnode = b1.idnode
)
If you want to make this quiry faster du a regular join
select b1.*
from business b1,
(SELECT
Hi everybody.
I have a table like that (i simplified it):
CREATE TABLE business {
idnode integer not null,
version_no integer,
c1 text,
c2 text,
c3 text
}
With a unique index in (idnode,version_no).
This table records many version from contents identified by idnode where
texts may be di