MySQL Forums
Forum List  »  Newbie

Re: XIRR Function in mySQL
Posted by: Sud Ku
Date: August 21, 2014 10:50PM

Thank you very much Peter!
I went through the link, I think I can convert to MYSQL procedure.
Now stuck at this query: (want little help to convert this query in MYSQL; I think its a query withn a query)

SELECT @Residual = @Residual + theValue / POWER(1 + @Rate, theDelta / 365.0E)
FROM ( SELECT theValue, DATEDIFF(DAY, MIN(theDate) OVER (), theDate) AS theDelta
FROM @Sample ) AS d

Other in general question to all:
In oracle there is exception handling mechanism something like below;

BEGIN
select into...
EXCEPTION WHEN NO_DATA_FOUND
do_something...
EXCEPTION WHEN OTHERS
do_something_else...
END;

Can we implement something like this in MYSQL? (Note: No_data_found is just an example, I know that, we can execute select count(1) query before select into. But there are some other runtime exceptions can be caught and debug easily by logging exception). If I could log exception wher and why it has occured, then also it would be a great help.

Any link to prior thread/discussion/Documentations on exception handling in MYSQL will also a great help.

Thanks,
Sud Ku

Options: ReplyQuote


Subject
Written By
Posted
August 21, 2014 10:38AM
August 21, 2014 11:57AM
Re: XIRR Function in mySQL
August 21, 2014 10:50PM
August 22, 2014 09:30AM


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.