Difference between revisions of "Query Tables/Version 6.1"

(Added editing and formulae sections)
(See Also)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Query Tables allow you to bring relational data into the Excel environment, while keeping a dynamic link to the data source. This means that when your data changes, your spreadsheets can be easily kept up to date.
+
<noinclude>{{VersionDisambiguation|pageVersion=6.1|disambiguationPage=Query Tables/Versions}}</noinclude>
 +
 
 +
XLCubed is primarily focused on cube-based data, but can also query relational databases directly. XLCubed creates a SQL Query object, which can then be updated as required using XLCubed formulae. The SQL Query can be built into a dynamic report and can be based on user-provided selections.
  
 
== Insert a Query Table ==
 
== Insert a Query Table ==
Line 22: Line 24:
 
; XL3QueryTableSetParam  
 
; XL3QueryTableSetParam  
 
: Allows you to set parameters on a Query Table
 
: Allows you to set parameters on a Query Table
 +
 +
== See Also ==
 +
* [[XL3QueryTableGetConnectionString|XL3QueryTableGetConnectionString formula]]
 +
* [[XL3QueryTableSetConnectionString|XL3QueryTableSetConnectionString formula]]
 +
* [[XL3QueryTableSetParam|XL3QueryTableSetParam formula]]
 +
* [[XL3QueryTableSetSQL|XL3QueryTableSetSQL formula]]
 +
* [[Example of connecting to a relational database - Adventure Works]]
 +
 +
[[Category:SQL Getting Started]]

Latest revision as of 14:04, 25 June 2015


XLCubed is primarily focused on cube-based data, but can also query relational databases directly. XLCubed creates a SQL Query object, which can then be updated as required using XLCubed formulae. The SQL Query can be built into a dynamic report and can be based on user-provided selections.

Insert a Query Table

To insert a Query Table:

  1. Select the XLCubed > Insert Formula > Query Table... ribbon or menu item:
    QueryTableWizard1.png
  2. Select an existing data source, or define a new one by clicking <New Data Source>
  3. Use the Query Wizard to construct the SQL query:
    QueryTableWizard2.png
  4. Select the destination for the Query Table, and confirm the connection string and SQL, then click OK:
    QueryTableWizard3.png
  5. The Query Table formulae will be inserted in the row that you selected, and the Query Table itself in the row below:
    QueryTableWizard4.png

Editing Existing Query Tables

Editing the XL3QueryTableSetConnectionString and XL3QueryTableSetSQL formulae allow you to edit the connection string and the SQL, respectively.

Query Table Control Formulae

XLCubed Excel Edition allows you to use formulae to help you manage your Query Tables:

XL3QueryTableGetConnectionString
Allows you to retrieve the connection details for a Query Table
XL3QueryTableSetConnectionString
Allows you to control the connection details for a Query Table. You can use regular Excel formulae to make the connection string, setting details such as the server or database name, then use this formula to easily change the Query Table
XL3QueryTableSetSQL
Like the XL3QueryTableSetConnectionString formula, XL3QueryTableSetSQL allows you to use Excel formulae to build up the SQL string to bring in user-selected criteria such as the period or the product the query should be run for. The XL3QueryTableSetSQL formula then references this statement, and each time the statement changes, the Query Table is referenced with the new criteria
XL3QueryTableSetParam
Allows you to set parameters on a Query Table

See Also