I have following columns in a table
DATE_TIME , MESSAGE , VALUE , SOURCE , LOT_NAME
Value is associated with SOURCE, LOT_NAME and MESSAGE.
I want to return data with following columns
DATE_TIME , MESSAGE , NEW_VALUE ,OLD_VALUE , SOURCE , LOT_NAME
where new value is the current row value and OLD VALUE is value of same MESSAGE same source but immediate previous batch vale.
How do I achieve this? Please kindly help .
NA