Hi,
Here's my query below. I have added a to_char to the dates in my tables (expiry_dstamp) but now my query is not taking the 'greater than' in my where clause into consideration.
Could someone please inform me on what I should now do with my where clause.
select *
from
(select distinct sku_id pfs, location_id pfl, to_char(expiry_dstamp, 'DD-Mon-YYYY') pfexd
from inventory
where pick_face = 'F') pf,
(select distinct i.sku_id npfs, i.location_id npfl, to_char(i.expiry_dstamp, 'DD-Mon-YYYY') npfexd
from inventory i, location l
where i.pick_face is null
and lock_code is null
and i.location_id = l.location_id
and l.work_zone not in ('DESPATCH', 'QUALITY', 'CHILLER', 'MARSHALL')) npf
where pf.pfexd > npf.npfexd
and npf.npfs = pf.pfs
order by pf.pfl
Thank you,
SM