One thing, I forget to add.. All the row's which has values more than 1, has values starting from 1. So it is like multiple inserts for the particular ID, which has row sequence ID starting with 1,2,3, .... . I need to take the rows which has only with 1.