MySQL Forums
Forum List  »  Stored Procedures

Re: MySql Percentile works in Select statement but not Function - ?
Posted by: Peter Brawley
Date: March 29, 2021 09:46PM

MySQL version?

I don't see an initialisation of user var @curRank.

IAC ...

If it's 8.0, your use of user vars is deprecated, you should convert the query to use windowing functions.

If it's 5.7 and initialising @curRank doesn't fix your problem, please provide a self-standing sql script with enough data to demonstrate the problem.

If it's pre-5.7, your version's past eol, all bets are off.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: MySql Percentile works in Select statement but not Function - ?
495
March 29, 2021 09:46PM


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.