AnsweredAssumed Answered

Identify when sorted field changes in table

Question asked by SeaQuest on Feb 13, 2009
Latest reply on Feb 14, 2009 by davidhead

Title

Identify when sorted field changes in table

Post

I have a simple table like this

 

Student #      Course       Course Count        

12345           Math 9        1

12345           Eng 9          2

12345           Sci 9          3

23456           Math 9        1

23456           Soc 9         2

23456           Sci 9          3

23456           PE 9           4

 

The table is sorted by Student Number. I simply need to flag the last record for each student. Like this... 

 

Student #      Course       Course Count     Flag

12345           Math 9        1                     0

12345           Eng 9          2                    0

12345           Sci 9          3                     1

23456           Math 9        1                     0

23456           Soc 9         2                     0

23456           Sci 9          3                     0

23456           PE 9           4                     1

 

The last record for each student is identified in the Flag field with 1, all other records are 0.

 

Any suggestions? 

 

Outcomes