Tuesday, April 19, 2011

Extracting Data from the Production Database

The following will allow you to extract data from a single file in HD. The following requires that an ODBC connection is already available on your PC.

For Excel 2003 click Data > Get External Data > New Database Query
For Excel 2007 click the Data Tab > From Other Sources > From Microsoft Query

The Choose Date Source dialog box will display. Select the data source and click OK.



The Add Tables dialog box will display. Select ARPMSLS and click Add


The Salesman Master file (ARPMSLS) will be added. Select ARID01 (Salesman ID) and ARNM06 (Salesman Name) by double clicking in the ARPMSLS box.

Note: If the query runs when each field is clicked then Automatic Query is enabled. To disable click Records and uncheck Automatic Query. You can also enter the field name directly into the boxes where ARID01 and ARNM06 are displayed below. When you click in one of these boxes a drop down arrow displays; the fields can also be selected from the drop down.


To display data from the file click Records > Query Now or click the "!" button. The records can be sorted by clicking Records > Sort. To add move the records to your workbook click File > Return Data to Microsoft Excel or click the fourth button from the left.


The Import Data dialog will display. Enter the location where you wish the data to begin on the worksheet or accept the default and click OK.


The data will now be loaded to your worksheet. The screen shot below is from Excel 2007 and will be different in Excel 2003.


No comments:

Post a Comment