locked
unable to get the auto increment value based on other column value RRS feed

  • Question

  • i am trying to get the auto increment value in a column based on the other column value.

    when the other column value changed the auto increment value reset and starts again.

    i have this table :

    expected result  getting result  time id  week  employee_name
    1 1 105 5/1/2012 0:00 abc
    2 2 106 5/7/2012 0:00 abc
    3 3 107 5/14/2012 0:00 abc
    4 4 108 5/21/2012 0:00 abc
    5 5 109 5/28/2012 0:00 abc
    1 6 105 5/1/2012 0:00 xyz
    2 7 106 5/7/2012 0:00 xyz
    3 8 107 5/14/2012 0:00 xyz
    4 9 108 5/21/2012 0:00 xyz
    5 10 109 5/28/2012 0:00 xyz
    1 11 105 5/1/2012 0:00 pqr
    2 12 106 5/7/2012 0:00 pqr
    3 13 107 5/14/2012 0:00 pqr
    4 14 108 5/21/2012 0:00 pqr
    5 15 109 5/28/2012 0:00 pqr
    6 16 105 5/1/2012 0:00 pqr

    Friday, August 10, 2012 5:39 AM

Answers

All replies