MySQL Forums
Forum List  »  Newbie

Compare Rows in same table
Posted by: Larry Bendall
Date: July 20, 2017 09:35AM

I have an audit table that keeps track of changes made to a vendor table.

id | Rev | DateEntered | Note | StatusID
---------------------------------------------------------
66 | 648 | 7/1/2015 0800| New Vendor | 10
66 | 17000|9/21/2016 1045| Quality Issues | 10
66 | 23494|9/27/2016 1423| Quality Issues | 50
66 | 23499|9/27/2016 1501| Quality Issues | 30
66 | 23541|9/30/2016 0800| Working on Quality| 30
66 | 32159|7/15/2017 0900| New Management | 20


I am trying to write a query that shows when the status changed.I want to list what it change from and to and when.

How do I compare the rows to get the status change?

Options: ReplyQuote


Subject
Written By
Posted
Compare Rows in same table
July 20, 2017 09:35AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.