Monday, September 22, 2008

COBIT Powerpoint Presentation


I researched to find out what COBIT was by reading IT Governance Based on Cobit 4.1: A Management Guide (Paperback)
by Koen Brand and Harry Boonen.

COBIT is an IT Framework for Governance. It has similarities to ITIL and some overlap. One person told me that COBIT is what you build and ITIL is how you do it.

Anyways, I made a brief powerpoint presentation on COBIT which may be viewed from Here

Obviously very high level, but with pictures and some text, it will help.

Tuesday, September 9, 2008

Determining Leap Year in Oracle and Days in February

Recently, I was playing around with a leap year issue and the number of days in February. I would like to share the following snippets of commands to help some people save some time.

--2 ways to determine if it is a LEAP YEAR in ORACLE

SELECT 2008 , Decode( mod(2008, 4), 0, decode( mod(2008, 400), 0, 'Yes', decode( mod(2008, 100), 0, 'No', 'Yes') ), 'No' ) as LEAP_YEAR
FROM DUAL;

or

SELECT DECODE(29, (SELECT to_date('01032008', 'DDMMYYYY') - to_date('01022008', 'DDMMYYYY')FROM DUAL),'LEAPYEAR','NOTLEAPYEAR')
FROM DUAL;

--2 ways to determine the NUMBER OF DAYS IN FEBRUARY in ORACLE

SELECT (EXTRACT (DAY FROM LAST_DAY(ADD_MONTHS(TRUNC(TO_DATE('2008','YYYY'),'YYYY'),1))))
FROM DUAL;

or

SELECT to_date('01032008', 'DDMMYYYY') - to_date('01022008', 'DDMMYYYY')
FROM DUAL;



Of course the input to these queries requires the year that you are inquiring about.