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
Subject
Written By
Posted
Re: XIRR Function in mySQL
August 21, 2014 10:50PM
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.