Re: custom serial number
От | Pavel Stehule |
---|---|
Тема | Re: custom serial number |
Дата | |
Msg-id | 162867790811180137p45226c5dn142194233c39a64d@mail.gmail.com обсуждение исходный текст |
Ответ на | custom serial number (mahmoud ewiwi <mahmoud_ewiwi@yahoo.com>) |
Ответы |
Re: custom serial number
|
Список | pgsql-sql |
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 >
В списке pgsql-sql по дате отправления: