Hello
what do you wont to do exactly?
you can try -
create sequence s;
postgres=# create sequence s;
CREATE SEQUENCE
postgres=# select to_char(current_date, 'yyyymmdd') ||
trim(to_char(nextval('s'), '0000')); ?column?
--------------200811180002
(1 row)
postgres=# select to_char(current_date, 'yyyymmdd') ||
trim(to_char(nextval('s'), '0000')); ?column?
--------------200811180003
(1 row)
regards
Pavel Stehule
2008/11/18 mahmoud ewiwi <mahmoud_ewiwi@yahoo.com>:
> hi gurus
> i have a problem in generating serial number with the form yyyymm0000 how can i do that?
>
> Mahmoud Al-Ewiwi
>
> Al-Mahawer
> Hebron- Palestine
>
>
>
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>