Running multiple SQL commands within a CL/QMQRY does not recognize the semicolon (;) separator. Is there a PTF...
that is required? I'm using V5R2.
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 .
Dig Deeper on DB2 UDB (universal databases)
Related Q&A from Kent Milligan
To solve the SQL error -321 on IBM i6.1, use the new values statement to overcome the error. If you are using an older release, declare a cursor ... Continue Reading
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ... Continue Reading
When developing tables in a parent-child relationship, use a primary key and a foreign key along with a unique ID to make your database easier to ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.