I can run rings around anyone in SQL, but it's been a while since I've used Oracle with SQL Plus
I've tried everything I could think of or find on line, so you're going to have to come up with something really good to solve this.
I know some of the paid_dates are null
I want the paid_date of any invoice that was paid within 3 days of the approved_date. Should be simple. It's not! I keep getting the error below. Tried case, nvl, is not null, everything. I saw an article about it being a known error by Oracle. Need a solution. I'm new on the job and want to prove my worth!
select to_date(to_char(paid_date),'RRRR-MM-DD') "PAID DATE"
from Ellipse.MSF260 a
where nvl(paid_date,1900-01-01) between '2010-07-01' and '2011-02-28'
and to_date(to_char(paid_date),'RRRR-MM-DD') between to_date(to_char(approved_date),'RRRR-MM-DD') and to_date(to_char(approved_date),'RRRR-MM-DD') +3
ORA-01841: (full) year must be between -4713 and +9999, and not be 0