5 pts.
 Delete and Update in Query Magager
How can I use delete and update statments in Query Manager (QMQ) in OS/400. I can able to create QM Queries for Select Statment but not able to update tables using Delete and Update statment.

Please help, a production project in pending for this.



Software/Hardware used:
OS/400 on IBM iSeries Servers
ASKED: November 21, 2009  2:00 PM
UPDATED: November 24, 2009  10:28 PM

Answer Wiki:
I do not believe QM supports updates. You should switch to use the RUNSQLSTM. ======================================================= Run STRQM and take option 10 (Work with Query Manager profiles). Position to the user profile running the QM queries; select option 2=Change. Scroll to the end of the Change Query Manager Profile display and set 'Select allowed Query Manager SQL statements' to 'Y'=Yes. Press <enter>. The list that appears allows you to customize the allowed SQL statements for that user profile when QM queries are executed. Tom
Last Wiki Answer Submitted:  November 23, 2009  8:24 pm  by  ASWDEVELOPER   405 pts.
All Answer Wiki Contributors:  ASWDEVELOPER   405 pts. , TomLiotta   107,845 pts. , CharlieBrowne   32,785 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

if you’re going to use a big hammer like SQL to delete things,
you might want to make a copy of anything you delete …
and keep your resume current …

 405 pts.

 

Before executing SQL DELETE, I run the same statement with SELECT * as the verb. This provides a clear list of what will happen when I replace the verb. Far easier than attempting to do the same by coding a program and far safer.

Not that it’s particularly dangerous either way since I’ll have journaling enabled. And it’ll all be done with a test subset in the beginning anyway.

Tom

 107,845 pts.