Query Management query (created via the CRTQMQRY command) is a single SQL statement, thus multiple SQL statements are not supported. You can, however, execute multiple QM queries using the STRQMPRC command. The source file member specified in the STRQMPRC command would look something like this:
'RUN QUERY QMQUERY1'
'RUN QUERY QMQUERY2'
As a simpler alternative, you may want to look at using the RUNSQLSTM command. This command lets you run multiple SQL statements (separated by semicolons) that are stored in a source file member .
|