Re: Creating custom Primary Key in SQL Server 2005



Actually, I am in contact with the Accounting Department. The
university uses the scheme for identifiers as:

2 digits for the year, followed by 2 digits for the # of the grant
assigned for that year (will be increasing to 3).

Also, I have found out that a PK as an integer drops leading zeros,
so I think the PK will need to follow the format:
4 digits for year, followed by 3 digits for the # of grant for that
year. (Ex: 2008001)

How would I go about retrieving the last 3 digits from the column in
the table and have it increment by 1? So, the next grant would be
(2008002). I can calculate the year very easily through C#.



.



Relevant Pages

  • Re: Creating custom Primary Key in SQL Server 2005
    ... university uses the scheme for identifiers as: ... digits for the year, followed by 2 digits for the # of the grant ...
    (comp.databases.ms-sqlserver)
  • Re: Combining hex values in a string
    ... This isn't exactly a Scheme question, but I am using Scheme so it ... (define (digits->integer digits base) ... (define (position item string) ... (define (convert-stuff buffer) ...
    (comp.lang.scheme)
  • Re: [RFC] Kernel version numbering scheme change
    ... But any new scheme will be just as annoying to someone and it messes up ... existing documentation, understanding and risks breaking third party ... Sure, but by then, the 2.6.521 release will be out and we could fix it ... having a small number of small digits is the way to go. ...
    (Linux-Kernel)
  • Re: Cantors "diagonal argument". My Objection.
    ... No natural number will correspond to it under your scheme. ... The dots refer to an infinite nonterminating sequence of digits. ... You are the idiot who thinks he can fix cars without even ...
    (sci.logic)
  • Re: Question for the math wizards...
    ... >> recommendation per FIPS for p is 1024 bits. ... use something less than 42 digits for their scheme. ... 42 digits are transmitted but some are apparently check digits. ... Their scheme is apparently a signature of the Product ID ...
    (sci.crypt)

Loading