|
Query Manager has 2 interfaces into creating QM queries. One is like interactive SQL, the other is very much like Query/400. And QM forms give you almost all the formating options of Query/400, with even some more options - like wrapping within a column, e.g. And you can do summary functions in the form, in addition to summary functions (GROUP BY in SQL, GRPFLD in OPNQRYF). Query/400 queries can be converted to QM queries (QM stands for Query Management, a cross-platform technology within IBM that encapsulates an SQL statement in an object). There are some things that do not convert well, in particular, type 2 and 3 joins from Query/400, so if you have a lot of those, it'll be harder. The Query Management Programming book has good info around Chapters 11 and 12. You can use STRQMQRY OUTPUT(*OUTFILE) to generate a file in CL. And you can use substitution variables in the SQL statement. Query Manager has extensive user authorization options. Plus you get the ability to write SQL in your RPG/COBOL/REXX applications. Can be very useful. > Bob, > Do have them get SQL/400 tool box, it is installed for free on V5+ > development package. You can create queries that are very complex. You can > use joins other than inner joins (which QUERY/400 only allows). It installs > Query Manager which is where you can create SQL objects to run with > STRQMQRY. You can also run some queries with RUNSQLSTM. I would still use > QUERY/400. It has far better reporting interfaces. You can actually edit > data how you want it just like using RPG. Combining the two can allow you > to create a robust report with good data formatting. > > The one reason I always use SQL to generate result sets is that you > can join tables on fields of different data type, (i.e., char to numeric) > with data conversion functions. I use SQL to create exception results, > results where data exists in one table but not in another. Using left outer > joins is great for that. > > > Thank you, > Matt Tyler > Mattt@wincofoods.com > > -----Original Message----- > From: Bob Carl [mailto:bcarl@knapheide.com] > Sent: Thursday, October 10, 2002 09:09 > To: Midrange Computing Technical NewsGroup for ISeries > Subject: SQL VS QUERY > > My account is getting ready to purchase some sort of IBM ISeries Query tool, > SQL tools, or both. I have been asked to provide justification for > investment in the SQL tool over or in addition to Query. > > Can you use SQL in a CL in the same fashion as query, such as to create a > file(Like OPNQRYF). I would think you can. I am wondering if we can scrap > query all together in favor of SQL (RUNSQL). Right now we do not use SQL for > anything but transferring data, such as in Excel or Client Access, but > considering its industry presence, it seems like a no-brainer. Please > submit to me your best arguments for using SQL, and if it can replace Query > completely and easily. > > Thanks in advance. > > Bob Carl, Senior Systems Analyst
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.