I have a table with Invoice Number, State, State dt, State tmstp
State has 5 values like Delivered, spooled, prepared etc.
I need to get the the state of a invoice number with most recent date and time tmstp.
For ex: if I have 4 states for a invoice with different dates and time, I need to get the most recent or latest state of that invoice
How to write a query for this ??
Also need to convert the date time to mm/dd/yyyy hh:mm:ss
State has 5 values like Delivered, spooled, prepared etc.
I need to get the the state of a invoice number with most recent date and time tmstp.
For ex: if I have 4 states for a invoice with different dates and time, I need to get the most recent or latest state of that invoice
How to write a query for this ??
Also need to convert the date time to mm/dd/yyyy hh:mm:ss