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!

Help converting pl/sql to mysql

2845823Jul 15 2016 — edited Jul 21 2016

I am in need of converting the following pl/sql to mysql, and thought this community might be able to help.    Having

a heck of time emulating in MySql.  It is the subtraction/addition of the interval statement with the julian part that

I cannot figure out.    I will also, post in some MySql areas, and any insight appreciated.

trunc(to_number(to_char(sysdate,'j'))/7) - trunc(to_number(to_char(trunc(sysdate,'yy') - interval '3' month, 'j' ))/7) + 1 as sysdate_fiscal_week_offset1,

trunc(to_number(to_char(sysdate,'j'))/7) - trunc(to_number(to_char(trunc(sysdate,'yy') + interval '9' month, 'j' ))/7) + 1 as sysdate_fiscal_week_offset2

Thanks,

Bob

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 18 2016
Added on Jul 15 2016
2 comments
611 views