In this article, we'll building the SQL request dynamically.
Written by Bruce Vining
In the January 2015 CL Corner, Enhancing WRKQRY Reports the Easy Way, we saw how to create an SQL view for use by WRKQRY using the Run SQL (RUNSQL) CL command. I received quite a few notes asking, among other things, for an example of how to build the RUNSQL SQL parameter using variables rather than the static approach taken in the previous article. So today we'll look at what's required to build the SQL parameter using variables/parameters. For demonstration purposes, we'll continue to use the PROJECTS file that was introduced in the previous article.