MySQL Forums
Forum List  »  Stored Procedures

Re: Error
Posted by: Peter Brawley
Date: May 08, 2018 10:49AM

Re-read the manual pages on stored routines. If it has a Return statement, it must be created as a function, not a procedure.

Did you try those Convert() calls in the mysql client? Firstday is a date, can't be assigned an int value.

And re-read the manual for If...End If; syntax, also the diff between a Date and a DateTime value.

The complications in your sproc probably aren't needed. Why not just convert the datetimes to ints with unix_timestamp, do the subtraction and return the no. of seconds?

Options: ReplyQuote


Subject
Views
Written By
Posted
1083
May 08, 2018 12:52AM
Re: Error
469
May 08, 2018 10:49AM


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.