The SQL_Query runs a select query against a SQL database and the results listed directly within Excel.

The control buttons on the left hand side perform the following function:

Button

Functionality

Query

Performs the SQL query in Cell “B17” on SQL instances in Cell “B15” and database in “B16”. The query will be outputted in columns D and higher.

Clear Results

Clears the results from column D and higher

Populate the select query in Cell “B17” the SQL instance in Cell “B15” and the database in Cell “B16”.

To use the windows logon account to connect to the SQL server set cell “B18” to True, for SQL logon set to FALSE. If SQL security is used then a user ID and password must be specified in cells “B19” and “B20”.

The result of the query will appear in Columns D and higher.