MySQL Forums
Forum List  »  Stored Procedures

Stored Procedures... are retarded
Posted by: Lance Olinger
Date: January 19, 2012 03:45PM

Seriously? Who came up with this?
There's an extremely simple alternative... you have a table with sql queries..
you join the table with whatever your qualification criteria is... you evaluate the field with sql code as a query instead of text with a function... done.

Calc_Type Formula
1 a*b
2 a/b

SELECT count*EVAL(formula) FROM table1 INNER JOIN calculation ON table1.calc_type = calculation.calc_type

End result is a single mysql query that can perform multiple calculations WITHOUT stored procedures. IMPLEMENT IT!

Instead with stored procedures you've got to basically write out a whole coding language to build and execute the query... that's what coding languages are for! It's quicker and easier to build the query with whatever coding language you are working in than it is to build it using stored procedures.



Edited 2 time(s). Last edit at 01/20/2012 11:35AM by Lance Olinger.

Options: ReplyQuote


Subject
Views
Written By
Posted
Stored Procedures... are retarded
2138
January 19, 2012 03:45PM
1130
January 22, 2012 05:53PM


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.