MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2008

Re: Way to get STRSQL SELECT to run in batch?



fixed

Dan wrote:
I suppose the way to do this is to create the output table with the fields
specified in the SELECT, then submit to batch a RUNSQLSTM with the same
query, but prefaced with a "INSERT INTO xxxxxxxxxx (" It seems to me that
this would give the same results. Any disagreement there?

No disagreement. I did just that on Friday, and it worked well.


But what a PITA! First, I have to manually create the output table, then I
have to put the query in a source member for the RUNSQLSTM, and then submit
the RUNSQLSTM. There's gotta be an easier way.

I usually use Helpsystems' SEQUEL, but I'm increasingly finding need for SQL features that aren't supported by SEQUEL. A couple of examples are Common Table Expressions (and by extension recursive queries) and User Defined Functions. Pure SQL also provides much more flexibility in join types and join conditions.

In short: I'd love to hear alternative suggestions too!





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact