locked
How to make a consecutive number for each unique entity in a table? RRS feed

  • Question

  • User-1538122812 posted

    Hello guys ,

    I am having a table in my database called "Schedules" ,this table stores the schedules for guards,for example : " a specific guard works in a specific site at specific interval of time" , my question is : how to create a field to be a like a distinctive consecutive number for each guard indicating the schedule sequence,hope you got my question right.

    Thanks.

    Sunday, June 24, 2012 3:29 AM

All replies

  • User-661350001 posted

    please check this

    http://blogs.msdn.com/b/sqlcat/archive/2006/04/10/sql-server-sequence-number.aspx

    http://www.sqlteam.com/article/custom-auto-generated-sequences-with-sql-server

    Sunday, June 24, 2012 2:19 PM
  • User-1538122812 posted

    Can you check the link please,it's not working.

    Thanks.

    Tuesday, June 26, 2012 1:29 AM