MySQL Forums
Forum List  »  Stored Procedures

Re: User defined variable in the stored function
Posted by: Alex Graham
Date: September 30, 2019 12:56PM

I dont need to use SELECT in the function, all I want to use is the stuff something like that
---
SET @myjson = '[[1, 14, 6], [15, 31, 6], [1, 14, 7], [15, 31, 7]]';
SET @month1=JSON_EXTRACT(@myjson, CONCAT('$[',j,'][2]'));
SET @fromdate=JSON_EXTRACT(@myjson, CONCAT('$[',j,'][0]'));
SET @todate=JSON_EXTRACT(@myjson, CONCAT('$[',j,'][1]'));
---
I also tried to use CHAR datatype for in the stored function, but no success.
It there a way to transfer @myjson from stored procedure to stored function?

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: User defined variable in the stored function
199
September 30, 2019 12:56PM


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.