How to use SQL Query Feature in Enterprise Manager

By Larry Teren
Do the following in order to generate an sql query that you can paste into Microsoft Excel:

Log into Enterprise Manager and establish a properly configured database. Click on the TABLES tab, highlight a table name and double-click on it. In our example below, we have chosen ARCU, the customer master file. Note that it indicates there are 13 rows or customer master records in the table (or file).

Once you double-click on ARCU, a listing of all the field names in the correct sequence display along with their attributes. For example, in the screen shot below, note that the customer name field is labeled CUSTOMER_NAME and that it is a maximum of 30 characters. STATE has 3 characters. It is important to get familiar with field names as well as the table id for use with sql commands.

Click CANCEL to restore back to the main screen. Click the SQL tab. Note that it automatically presumes you are using the Data Set you are currently pointing to (OSAS Data) . An optional field of input is PREFETCH SIZE. The default is 100. This is the typical number of rows the sql query will return. You can change it to make it higher.

In the SQL commands statement box, type: SELECT * FROM ARCU and click EXECUTE. This will return a display of all records in the customer file to the RESULTS AND MESSAGES box in cell grid format. In this example command, * means all fields in the customer file and ARCU is the table name for the customer master file that we saw earlier.

To select all customers from Illinois but only the customer id, name and city and state, type the following sql query: SELECT CUSTOMER_ID, CUSTOMER_NAME, CITY, STATE FROM ARCU WHERE STATE = ‘IL’

We may further refine the sql query by typing:

Once the results display, you can then click the CLIPBOARD button and the entire results get saved to the clipboard. You can then open a new Microsoft Excel Workbook and paste it into it.

For more information, call (773) 502-5771 .

click here to return to home page

Leave a Reply

Your email address will not be published. Required fields are marked *