Hello, I'm stuck on how to grab the user that made a change from an auditor table? How do I look for the first occurrence of a new value, and then grab the previous rows audit_user and audit_date?
The way that I understand it, the auditor tables store the user that made a change, and then the old values that were in the audited table before the change. So the audit_user and audit_date are not for the data in the same row, but are for the next newest row. Do I need a window function so I can look at previous rows? Or is there a much simpler way to do it? Maybe a window with lag()/lead() to shift the audit_user and audit_date to the next row? I'm working on seeing if I can pull out barcode creation info, to fill in actor.card creator and create_date for LP#1705332, which adds those fields into actor.card. Thanks for any hints. Josh [image: Company logo] *Josh Stompro* *IT Director [email protected] <[email protected]>* *218-233-3757 ext. 139* | *Mobile: 218-790-2110* *Lake Agassiz Regional Library | **www.larl.org <http://www.larl.org>* 118 5th ST S Moorhead MN 56560 *Celebrating 60 Years of Service in 2021!*
_______________________________________________ Evergreen-dev mailing list [email protected] http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-dev
