Hire me on UpWork

Wednesday, November 30, 2011

How to Show / Get, Year Month and Date between two date ?

 Use bellow sql to show year month and date..
   
    SELECT    TRUNC (MONTHS_BETWEEN (:END_DATE, :START_DATE) / 12) as YEARS,
MOD(TRUNC (MONTHS_BETWEEN (:END_DATE, :START_DATE)), 12) as MONTHS,
            (  TO_DATE (:END_DATE)- ADD_MONTHS (:START_DATE,TRUNC (MONTHS_BETWEEN (:END_DATE, :START_DATE))))  as Date
      FROM DUAL;

Monday, September 26, 2011

How to Show/ Get First Date of a Month in Oracle Sql ? (Part-2)

In my earlier post i show one method of retrieving first day of a month by  oracle built in function, which is ADD_MONTHS.

Now i show another method. Write the following code and get the megic.

SELECT TO_DATE(TO_CHAR(SYSDATE,'MONRRRR'),'MONRRRR')
FROM DUAL

Helpful ? Need more stuff. just leave you comments.

Sunday, June 5, 2011

How to Install Oracle Developer Suite 10g on Windows Vista / 7?


When you try to install Oracle Developer Suite on your windows Vista or Windows 7 PC but it’s failing giving an error message "Checking Operating system version must be 5.0, 5.1 or 5.2..... Actual 6.0 or 6.1 - Failed"
What will you do?
Don’t worry, simply follow the following steps, and it will works.
Before installation, right click on setup.exe then click properties, from the tab select compatibility and select windows xp service pac3/pac2 from compatibility mode settings.

Click ok…
And now try to install... it works