Where Do Queries Come From?
Project Managers have a reasonable grasp of the technical aspects of reporting. They are curious about the details of reporting projects they manage and ask lots of questions to broaden their knowledge. One question that has come up lately a few times is about Query Definitions and where they come from. Here is my response…
- Report developers build special reports that are nothing more than a connection to a database and a SQL query. The result of these compiled files is called an Information Object (IO). While not absolutely true, this can be thought of as equivalent to a View in a database.
- Users can typically access that IO to further define the set of data being reported. Saving a version of that effort results in a Query Definition (QD). A QD is not in itself a report but something more like a Query or a Stored Procedure.
- When a user or a schedule runs a QD and stores the results a third file is generated. I guess this would be called Query Output or (QO) but I never worry about that file since it’s well into the user end of the process. A QO is a real report; something that can be looked at and printed.
So, a Query Definition requires an Information Object. If you want a regularly scheduled output, you will need to create QDs that can be scheduled. Otherwise you can go straight from an IO to output when users run ad hoc reports.