Notifications
Clear all
Topic starter
Has anyone had any success running a report on order history by user to see who specifically canceled an order?
Posted : March 18, 2015 7:14 am
Using CPS:
If you assume the last person to touch the order is the one who canceled it, you can use PUBUSER as the user and PUBTIME as the datetime it happened. You could accomplish this by the following query:
SELECT o.CODE, o.DESCRIPTION, u.FIRSTNAME, u.LASTNAME, u.LOGINNAME, dbo.Convert_ID_to_date(o.PUBTIME) CanceledOn
FROM ORDERS o
JOIN USR u ON o.PUBUSER = u.PVID
WHERE o.STATUS = 'X'
AND o.ORDERDATE BETWEEN '01/01/2015' AND '03/18/2015'
ORDER BY o.PUBTIME DESC
Posted : March 18, 2015 7:29 am