MySQL Forums
Forum List  »  Oracle

Help convertin pl/sql to mysql
Posted by: Bob Bell
Date: July 15, 2016 09:51AM

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

Options: ReplyQuote


Subject
Views
Written By
Posted
Help convertin pl/sql to mysql
1942
July 15, 2016 09:51AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.