Advertisement
chrissharp123

Untitled

Jul 25th, 2018
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT  acqli."id" AS "Lineitem ID",
  2.         acqlid."barcode" AS "Barcode"
  3.   FROM  acq.lineitem_detail AS acqlid
  4.         INNER JOIN asset.copy AS copy ON (acqlid."eg_copy_id" = copy."id")
  5.         INNER JOIN acq.lineitem AS acqli ON (acqlid."lineitem" = acqli."id")
  6.         INNER JOIN acq.cancel_reason AS acqcr ON (acqlid."cancel_reason" = acqcr."id")
  7.   WHERE acqcr."id" IN ('2001','2002','2003','1285','2005','1002','2008','2010','2036','2012','1','2034','2013','2018','2015','2016','1007','1010','2019','2020','2021','2022','2023','2035','2','2026','2028','2033','2032')
  8.         AND copy."deleted" = '0'
  9.   GROUP BY 1, 2
  10.   ORDER BY acqli."id" ASC, acqlid."barcode" ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement