Volkan,

> CREATE SEQUENCE document_docorder_seq START 1;
>
> UPDATE document
>   SET docorder = T.docorder
>  FROM (SELECT nextval('document_docorder_seq') AS docorder, docdate
>          FROM document
>         ORDER BY docdate) AS T
> WHERE document.docdate = T.docdate;
>
> DROP SEQUENCE document_docorder_seq;

thank you. Excellent.

Andrus. 



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to