well my example was incomplete :
at the begin :
chapter_id | evolution | index
1 | 0 | 1
2 | 0 | 2
3 | 0 | 3
4 | 1 | 2
5 | 1 | 4
by using the sort function i obtain this :
chapter_id | evolution | index
1 | 0 | 1
4 | 1 | 2
2 | 0 | 2
5 | 1 | 4
3 | 0 | 3
that why i can't use ORDER BY...
-----Message d'origine-----
De : Ragnar Hafstað [mailto:gnari@simnet.is]
Envoyé : lundi 14 mars 2005 12:11
À : FERREIRA William (COFRAMI)
Cc : 'Richard Huxton'; GIROIRE Nicolas (COFRAMI);
'pgsql-general@postgresql.org'
Objet : Re: [GENERAL] Convert Cursor to array
On Mon, 2005-03-14 at 10:44 +0100, FERREIRA William (COFRAMI) wrote:
> so we choice to use a different solution which consist on using the
> index of a chapter and its evolution.
> if we have this data :
> chapter_id | evolution | index
> 1 | 0 | 1
> 2 | 0 | 2
> 3 | 0 | 3
> 4 | 1 | 2
>
> by using our sort function we obtain this :
> chapter_id | evolution | index
> 1 | 0 | 1
> 4 | 1 | 2
> 2 | 0 | 2
> 3 | 0 | 3
>
in what way is this different than
... ORDER BY index ASC, evolution DESC;
?
gnari
This mail has originated outside your organization,
either from an external partner or the Global Internet.
Keep this in mind if you answer this message.