Help for some very beginning SQL programming.! We are trying to use the 'With common table expression' to use the result set from the first SQL in the second SQL and then return two results sets. Sometime, the files from the first SQL are very large and this Select already narrows the data down for the second Select. We have read a lot, but there is no good example of the common table expression and how to use it.
There is an example of the common table SQL statement in the information center at the bottom of the page located here. This example shows selecting multiple values from a field in a table using a UNION to create the temporary result set and specific fields to reduce the time required to execute the select. Additionally, the example groups the records by the selection.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Dig Deeper on iSeries COBOL programming
Related Q&A from John Brandt
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.