this may help and worth a try to use in database processing by using explicit pass through
I have pasted the code from http://support.sas.com/kb/41/616.html
datepart code should be very similar, change the where clause to oracle datepart from below code
and a quick google search will you help with datepart code
proc sql; connect to oracle(user=user password=password path=path);
create table work.job204 as
select * from connection to oracle
(select * from Employees where jobcode=204); quit;