Users need a flexible query tool that is powerful and easy to use.
Is your query tool up to date and function-rich? Are you able to build queries that end users, managers, and departments can use? Can it collect data from or send data to other systems or platforms? Does it provide run-time prompting? Does it handle data-mapping errors, especially around numeric date fields? Does it take advantage of SQL Query Engine (SQE) to improve run-time performance? Does it provide multiple interfaces—green-screen, Web browser, and GUI? Can it send query results directly to a PC document (.xlsx, PDF, text, HTML, etc.)?
We've all experienced that little tinge of panic one gets when hit with a request for a report at the last minute. Knowing how to get the most from your query tool can ensure you get the information you need, when you need it.
The query solution is SEQUEL.
To build a query, you need to know where the data is kept. Data is kept in files (tables) stored in a database. These database files store information about people (customers), products, orders (sales information), or anything else. Databases reside on platforms like IBM i, SQL Server, Oracle, or MySQL. As your company grows, so does your data, and managing your information becomes more difficult. By using the right SEQUEL, you will be able to scan and easily retrieve the information you need no matter how large or complex your database becomes.
Using SEQUEL to build queries has advantages. When building a query, first select your file(s), and then select the fields for the data to be returned. In the following example, data is selected from two files, CUSTMAST and ORDHEAD. Next, join the files together on common fields such as Customer Number.
In this example, we have selected several fields on which to return data using SEQUEL ViewPoint, the graphical interface to SEQUEL. This view has variables, and the user can select one or more states and specify a date range, selecting only those matching records.
Figure 1: This example shows the variable input screen that the user sees when running the query from the GUI.
With the proper query tool, you can add calculated fields (e.g., SALES = Quantity x Actual Selling Price) and sort data quickly (e.g., order by Customer Name, Order Number, and Date).
SEQUEL provides several output options as shown in the following chart.
Figure 2: Compare output options.
What about performance? Do you have files that are very large, perhaps several million records or more? Do queries take forever to retrieve records? Sluggish performance can impact your users. Ideally, your query tool should take advantage of IBM's fast intelligence query engine known as SQL Query Engine (SQE). Query/400 is built to run over the old Classic Query Engine (CQE). SEQUEL allows you to select either CQE or SQE to run your query.
How does your query tool handle date fields? With SEQUEL, you can convert a numeric or character date field into a true date data type field quickly and easily. Verify whether the data can be converted to a valid date; if not, replace it with a NULL value to avoid data-mapping errors. Once converted, you can sort on that date field and select records by date range.
The following examples use SEQUEL to convert a numeric date field into a true date data type field:
- CVTDATE(mydatefld,ymd)
- CASE when VALID_DATE(mydatefld, "*YMD")=1 Then CVTDATE(mydatefld,ymd) Else NULL End
With actual date fields, date calculations become very simple:
- DAYS(order_date) – DAYS(ship_date)
- Current Date – 3 months
SEQUEL allows you to display data that is meaningful to you. You can check the value of a record and change the returned value before displaying it. You can also enhance reports to make data stand out.
Figure 3: Generate useful, attractive reports.
Consider distribution options for your end users. Do they access information from a green-screen, browser, and/or GUI? Do they need information displayed in a dashboard? Do they need information on a daily, weekly, or monthly basis?
SEQUEL Is the Query Tool for You
The solution to your query challenges is with SEQUEL. It's easy to use, reliable, and hassle-free. SEQUEL will help you take the final step toward modernizing your data. The dashboards, Web interfaces, pivot data, email, prompted queries, and excellent support team at your fingertips will help you get the data you need fast and how you need it. What are you waiting for? Take a 30-day free trial of SEQUEL. You won't be disappointed.
LATEST COMMENTS
MC Press Online