Re: to add table with primary key
From: codadilupo <yossarian99_at_operamail.com>
Date: Mon, 10 Mar 2008 09:35:11 +0100
Message-ID: <47d4f2bf$0$16043$5fc30a8@news.tiscali.it>
>
> Of course it can when the year is added - that is the
> other part of the request: change the control record from
> 2007 to 2008.
Date: Mon, 10 Mar 2008 09:35:11 +0100
Message-ID: <47d4f2bf$0$16043$5fc30a8@news.tiscali.it>
Frank van Bortel wrote:
>>> For example, some of my clients don't want sequence gaps or want >>> sequences to start again with 1 at the beginning of each year. >> Obviously this can NOT be used as a PK.
>
> Of course it can when the year is added - that is the
> other part of the request: change the control record from
> 2007 to 2008.
Since creating my own 'numbering system' reminds me of my Oracle 5 days I tried to satisfy client's request by creating a bunch of sequences named "table_name_yyyy_seq" (where "yyyy"=2000,2001,2002 etc.) and using NDS in the trigger in order to use the sequence corrisponding to the year (which is another PK column, of course).
I don't know which approach is worse...
C. Received on Mon Mar 10 2008 - 03:35:11 CDT