1) I am not good with writing stored procedures. (This is really the overwhelming reason. The rest are just excuses) 2) To build a black box I would need to build it to accept between 2 and 20 variables (Could be over a million, but no one has asked for anything containing more then a dozen, so 20 would be safe). 3) The SQL is easy once I figured out how to pass orders to an outer query using a temp table. 4) I may use ordering functions from 2 to 5 different tables, pull primary criteria data from 1 to 4 different tables and have literally thousands of relational points in those tables (and ID in table A can relate to up to 1K of points in table B and tables A, B, C, and D are growing fast.) This seems complex for a black box. But mostly, or rather, entirely, the first reason is the trump card. I have built very complex Black Boxes and relatively simple SQL engines in Java. But I have a fairly good understanding of Java, and almost no understanding of IBM's PL language. If you are good at stored procedures and are willing to work for beer and pizza I would absolutely love to get some practical training. Especially when the query's start taking longer and longer to run. And, of course, I will need to build the black box in something in probably less then a year so I can distribute the work out the original requestor via a dynamic menu driven builder. But I do not have the time for that now. -----Original Message----- From: plug-discuss-bounces@lists.plug.phoenix.az.us [mailto:plug-discuss-bounces@lists.plug.phoenix.az.us] On Behalf Of Judd Pickell Sent: Tuesday, June 17, 2008 1:37 PM To: Main PLUG discussion list Subject: Re: SQL Question - Complex ordering > Also, I do not use stored procedures because the criteria changes with > every run. Think of it like going to the cable company and asking to > have a cable package put together where you choice from millions of > different channels based on your interest in the programs run on those > channels. Every person will be different. I just wanted to take a moment and follow this theory. I admit that I am not the greatest person at doing stored procedures, but the stored procedure is supposed to provide a programmable way to do all the things that you need to do. So you can modify your final output based on the criteria passed rather than being limited by the simple sql possibilities. Also I believe you can run stored procedures from within stored procedures, so you can basically build a controlled blackbox that based on the information coming in, can do many different things. Sincerely, Judd Pickell --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change your mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change your mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss