DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: deleting duplicates

  1. #1
    Join Date
    Mar 2004
    Posts
    52

    deleting duplicates

    How do i delete a row if it's a duplicate and delete based on date

    Like for job_id 12345 we havetwo rows one row with a date and time 03/14/05 11:53 and another 03/14/05 14:55

    I would like to delete the row 03/14/05 11:53 am

    can some one help please

    Thank you

  2. #2
    Join Date
    Dec 2000
    Posts
    126
    try :

    DELETE FROM
    WHERE ROWID NOT IN
    ( SELECT ROWID FROM

    WHERE <> (SELECT MAX(date> FROM
    )
    )

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •  


    Click Here to Expand Forum to Full Width