Execute Queries on MaxDB Database Tables using Microsoft Excel
MaxDB has many tools like SQLCLI, WeSQL, etc which help us in performing data manipulation operations. All these need some fundamental ideas about Queries and Syntax for performing the data manipulations. But there are simpler techniques to retrive the data from MaxDB, without using these tools. Microsoft Excel is a very useful and easy to use tool for every one. This weblog explains how to access a MaxDB database for retriving the data to the Excel sheet.
Creating a Data Source for MaxDB Database
First and the most important thing to be done is the creation of data source for the MaxDB Database. To create a data source the following steps are to be followed.Create an ODBC Data source in the System.
Goto Start -> Settings -> Control Panel -> Administrative Tools -> ODBC Data Sources.
Then in the User DSN tab click Add. This will display a window with a list of drivers choose MaxDB and click Finish. This will display a MaxDB ODBC Dialog. Fill this with the necessary information. In case if the local system is the server then the SERVER field can be left unfilled in the dialog box. Then click OK to create the data source. With this 50% of the task is completed.
Executing Queries using Microsoft Excel
Now the Microsoft Excel can be used to access the created MaxDB Data Source and execute queries as shown below. Open a new excel workbook and follow the steps given below.
1. In the menu goto Data -> Import External Data -> New Database Query
2. Here choose the MaxDB Data Source created and click OK.
3. Enter the user name and Password in MaxDB 7.5.0 Login dialog window and click OK.
4. Choose the required table and necessary fields from the Query Wizard.
5. Set the required filtering conditions next in the Query Wizard.
6. Set the sort conditions if required.
7. Choose Return Data to Microsoft Office Excel option and click finish.
8. Specify where the retrived data is to be placed.
9. Save the Data and Query.
Thus it is much simpler to execute queries to retrive data from MaxDB using Microsoft Excel.