How to query odd record

  • i have a data that looks like the below.Every record should have set and clear but some don't. Therefor, how would I query those record that have set but not cleared? The result I am looking for is b , record set , 1/2/12 and c both set record 1/2/12 and 1/3/12. Could anyone help me with this? Thank you

    col1col2date time

    arecord set1/1/12 2:21

    arecord clear1/2/12 3:21

    brecord set1/1/12 4:10

    brecord clear1/1/12 3:12

    brecord set1/2/12 13:12

    crecord set1/2/12 14:11

    crecord set1/3/12 15:11

  • shel (11/28/2012)


    col1col2date time

    brecord set1/1/12 4:10

    brecord clear1/1/12 3:12

    brecord set1/2/12 13:12

    I don't think the sample data you provided is consistent. You can see above that the date time for the 'record clear' row is lesser than both rows of 'record set'.

    That means the record is being cleared before even getting set. Is that possible??....Please post consistent sample data. Please take a look at the link in my signature and post DDL, Sample Data and the Expected result set accordingly.

    Doing this would get you a reply for your requirement in no time.

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

Viewing 2 posts - 1 through 1 (of 1 total)

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