Attached below is my sql query that is working fine. I would like to add a WHERE clause to show
WHERE a.docdate = 'last weekday'
If today is Monday then I would want it to show all records where a.docdate='Friday'
select a.sopnumbe, a.custname, a.cstponbr, a.docdate, a.user2ent, b.ponumber from
(select * from sop10100 where docid = 'WARRANTY') A
(select * from sop60100) B
on a.sopnumbe = b.sopnumbe
group by a.sopnumbe, a.custname, b.ponumber, a.docdate, a.cstponbr, a.user2ent