Home > Ask the AS/400 Experts > DB2/400 and DB2 UDB Questions & Answers > Running multiple SQL commands within a CL/QMQRY
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Running multiple SQL commands within a CL/QMQRY

Kent Milligan EXPERT RESPONSE FROM: Kent Milligan

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 27 September 2005
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 .


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
DB2/400 and DB2 UDB
When is the YES option for 'reuse deleted files' function the best choice?
Monitoring members 'stuck' within a physical file on an EDI system
Developing tables in a parent-child relationship in DB2
SQL server error message -321
Creating a host variable of the 'where in' statement in SQL
Choose which column names are returned via ODBC when working with DB2 files
Allow access to data from a stored procedure result set using COBOL or RPG
Access path and an open data path differences
Convert a numeric physical file to a character in SQL without leading zeros
Inserting data from a CTE into a file in SQL

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts