Was this helpful?
Query Troubleshooting
Problems related to query processing usually result from misstating the query or from syntax errors or ambiguities as a consequence of parameter substitution.
You can easily test the form and structure of the query by using a terminal monitor utility. Its diagnostics are sometimes more detailed than those of Report-Writer, particularly where syntax is concerned.
Note:  If your Report-Writer code includes a .sort statement, add an order by clause to the select statement when testing the query in a terminal monitor.
The single most useful means for determining query behavior is the II_EMBED_SET environment variable/logical. If you include the value printqry in its value string, execution of the report produces an "iiprtqry.log" file in the current directory. This log contains the text of all queries sent to the database, as formulated after all variable substitutions have occurred. The actual report query appears towards the end of the log file (after all queries related to Report-Writer's access of the Ingres catalogs). For information on setting this environment variable, see the System Administrator Guide.
Last modified date: 08/14/2024