Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

to_char into where clause

699582Jan 7 2010 — edited Jan 7 2010
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
This post has been answered by 21205 on Jan 7 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2010
Added on Jan 7 2010
6 comments
3,558 views