scarlam (10/25/2012)
I apologize about that. Glad you were able to make sense of my question. My table structure would follow along the lines of what you have posted.How would i loop through the records in the source table, find the bebeginning of a group of records?
To assist you in finding "the beginning", what or how would you define beginning, by say a column that contains the datetime the row was entered, or does the table uses an identity column, or ? ? ? Here I can not guess what you would use or have available in that table.
And remember the most efficient method is a set based method (if available), NOT looping through a table.