Projects - EBS (MOSC)

MOSC Banner

date store in the varchar2 and compare in the sql statement

edited Dec 7, 2017 4:51AM in Projects - EBS (MOSC) 3 commentsAnswered

select * from pa_projects_all where

to_char( NVL(to_date(attribute6,'YYYY/MM/DD'),SYSDATE),'DD-MON-YYYY')         

between to_char( NVL(to_date(:p_date_from,'DD-MON-YYYY'),SYSDATE),'DD-MON-YYYY')

And  to_char( NVL(to_date(:p_date_to,'DD-MON-YYYY'),SYSDATE),'DD-MON-YYYY') 

and attribute6 is not null

Above SQL statement throws ORA-01861 error.   Here attribute6 is varchar2

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center