MySQL Forums
Forum List  »  Stored Procedures

Stored Procedure help
Posted by: kevin hadley
Date: January 05, 2009 06:58AM

hi, I am new to mysql so forgive my ignorance with my questions. I am trying to write a stored procedure which examines the last 3 recorded events on a test system. Each test system event creates an error code which is inserted into the table stored in mysql.

From a query perspective I can use

SELECT critError FROM histdata.jobhistory where scheduler='live_relt' and lteName='stepney' ORDER BY jobId DESC LIMIT 3;

I can then visually check the fields are the same. What I would like to do is write a stored procedure that compares these last 3 results and outputs if they are the same. Is this possible to do using stored procedures or would i need a separate piece of code in c to do this? Any help would be appreciated

Options: ReplyQuote


Subject
Views
Written By
Posted
Stored Procedure help
2828
January 05, 2009 06:58AM
1632
January 05, 2009 10:54AM
1548
January 06, 2009 06:45AM


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.