Unanswered: SQL0440N No authorized routine named "ADD_MONTHS" of type "FUNCTION
Can someone plz point out what i shd do to get all the results for the following condition
all schools whose from_date is 12 months before 2001-09-04
all schools whose to_date is 12 months after '2001-09-04
I am getting SQL0440N No authorized routine named "ADD_MONTHS" of type "FUNCTION
using db2 ver 8
SCHOOL_MASTER M , SCH_ACCRED A
M.SCHOOL_CODE = A.SCHOOL_CD
AND A.FROM_DT = ADD_MONTHS(TO_DATE('2001-09-04 00:00:00', 'YYYY-MM-DD HH24:MIS'), -11)
AND A.TO_DT = ADD_MONTHS(TO_DATE('2001-09-04 00:00:00', 'YYYY-MM-DD HH24:MIS'), 11);
to_date are oracle functions and db2 does not need that
you can use date/time function to extract date or time from timestamp
month/day to extract months
or use months/days... to calculate with months
see infocenter for detailed syntax http://publib.boulder.ibm.com/infoce...c/r0000789.htm
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be