Results 1 to 4 of 4

Thread: ID or pK

  1. #1
    Join Date
    Sep 2002
    Posts
    18

    Unanswered: ID or pK

    Hi Guys

    My primary key compromises of things like 21-GH-001, 21-GH-00221-GH-999. How can I make the SQLServer this for me? I want it to increment my primary keys as follow:
    21-GH-001
    21-GH-002
    21-GH-003
    21-GH-004
    .
    .
    .
    .

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    What happens when you get to 21-HG-999?
    Paul Young
    (Knowledge is power! Get some!)

  3. #3
    Join Date
    Sep 2002
    Posts
    18
    It will just go 21-GH-1000.

  4. #4
    Join Date
    Oct 2002
    Location
    Trivandrum
    Posts
    3
    You can use Insert Trigger

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •