MySQL Forums
Forum List  »  Stored Procedures

Re: Error " #1241 - Operand should contain 1 column(s)" when calling a function
Posted by: Geraint Torrington
Date: August 26, 2009 09:37AM

Hi Jay,

Thanks for pointing me in the right direction.

My "SET v_years_between" was the culprit. Something in there wasn't right, but I didn't really like it anyway and was hunting for something different to calculte the whole years between two dates. I found that using TIMESTAMPDIFF(YEAR, p_date_of_birth,p_date_to_check ) was much simpler and my function worked as expected.

To identify the "bad" code I just commented out each line of code to see where the problem lay. Luckily for me it was pretty near the top.

Cheers,

Geraint..

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Error " #1241 - Operand should contain 1 column(s)" when calling a function
1971
August 26, 2009 09:37AM


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.