Sir/Madam,
We used STRSQL- FOR START SQL(Structured Query Language) and
STRQRY- FOR START QUERY.
SO My question is ------------------
WHAT IS DIFFERENCE BETWEEN STRUCTURED QUERY AND QUERY ? (SQL AND QRY)
?
Thanks in advance ....
Software/Hardware used:
software/hardware
ASKED:
July 23, 2012 5:55 PM
You should see a lot of the differences, when you issue the commands.
STRQRY – Query/400 is a mature product, limited in scope to reporting data and rather more user friendly (or constricting, depending on your perspective and sense of adventrue).
Although Query/400 (STRQRY) is more user-friendly than STRSQL (interactive SQL), the presence of STRSQL on a system indicates that STRQM (QM query) is also available. The ‘PROMPT’ mode of QM query is very similar to STRQRY.
Also, QM query is a SQL interface where STRQRY is not. That means that newer SQL data types can be processed by QM but not by STRQRY. I.e., newer files might not be available at all for STRQRY.
It also means that QM query can use the SQE while STRQRY is restricted to the CQE. If the database is properly designed, the SQL interfaces will perform better and use less system resources.
Other advantages exist for STRQM over STRQRY. Except for having fewer options, which for some users can make it feel less “complicated”, I can’t think of a single reason to use STRQRY when STRQM is available.
Tom
You will probably find it easier to format a report for users using Query/400. By that I mean report headings, column headings, totals and sub-totals.
We find SQL is a great tool for developers who just want to see the data right now and are not worried about format. These are typically ad hoc listings.
You will probably find it easier to format a report for users using Query/400.
Between straight SQL and Query/400, that’s true. SQL (itself) doesn’t do reports. Some type of “Report Writer” function is needed for that. A minimal default reporting function is supplied as part of STRSQL, but it doesn’t include any formatting functions for page headers, page footers, totals, etc.
However, the QM query interface to SQL has a much more sophisticated reporting tool than Query/400. Reports can be created in QM that are effectively not possible with Query/400. As is often true, though, determining whether those are “easier” or not gets foggy when sophistication increases.
Tom
And SQL can update, insert, and/or delete record. It can create stuff (tables, indexes, views). It can delete (drop) stuff. And that’s just a bit of what SQL can do.
Another benifit I like is when running SQL within operations navagator you can save you results right to an Excel file with the allow save results option.
Also you can run CL commands for example
CL: CLRPFM DATALIB/PGMS