retrieving duplicate consecutive records.

  • xpscodes (3/10/2008)


    Thanks for the review. I thought no one will bother looking at the query as the original poster was satisfied with Mark's solution.

    One of the issues I saw above is that you're finding the employee with an in-out issue, but not the location of the issue. Because you're using a rowid field, if one record is out of sequence, I think all records after it fail because there's no way for the employeeID to "reset" once it finds a checkin again

    If the checkinout id is an identity column, is there a chance that a record could be out of sequence. My understanding here could be wrong. Could you provide a sample. Thanks

    Ah. My complete mistake. Although my create table code probably had the identity construct in it, I didn't assume that. If the field is an identity field, I like your way better. I wrote mine using the timestamp field and then edited it back to the PK field.

    I'm also still getting used to using the row_number function creatively...

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply