Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java to PL/SQL

dbdanOct 17 2011 — edited Oct 18 2011
Hi All,

I wanted to convert some Java procedures to PL/SQL procedures due to performance issues. Is there any tool or inbuild utility in Oracle to do that or Do I need to manually re-write the logic?


Eg. this simple java code, if I want to convert to PL/SQL
	private static final long calculateDays(Date dateEarly, Date dateLater) {
        long lngNoOfDays = 0;
        if (dateEarly.before(dateLater) || dateEarly.equals(dateLater)) {
            lngNoOfDays = (dateLater.getTime() - dateEarly.getTime()) / (24 * 60 * 60 * 1000);
            lngNoOfDays = lngNoOfDays + 1;
        } 
        return lngNoOfDays;
    }
Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2011
Added on Oct 17 2011
5 comments
407 views