MySQL Forums
Forum List  »  Stored Procedures

Re: Case statement inside a cursor loop in stored procedure
Posted by: Peter Brawley
Date: October 20, 2012 08:50AM

Why bother with a cursor?

update employers_to_migrate 
set number_of_employees =
  if( employee_count between 0 and 10, "0-10",
      if( employee_count between 11 and 100, "11-100", "other" )
  );

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Case statement inside a cursor loop in stored procedure
1365
October 20, 2012 08:50AM


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.