instantOLAP Online documentation 2.2.7 - SQL-Expressions in instantOLAP

SQL-Expressions in instantOLAP

The SQL-Keyloaders and the SQL-Cubes use SQL-Expression for their definition. SQL-Expressions have a SQL-like syntax but only are fragments of a whole SQL-statement. The statements are assembled out of this fragments by the instantOLAP SQL-generator every time a loader or cube queries the database.

SQL-Expression also use types but the type-system is less restrictive than the one for expressions. Mainly the system only distinguishes between Strings, Numbers and Boolean-Expressions. Boolean-Expression are expected for all WHERE properties inside the loaders and cubes, all other properties allow any type.

Every time a loader or cube executes a query, the SQL-statement will be generated before. Basically each time a statement is generated the following steps will be performed:

  1. All needed SQL-expressions are collected
  2. All needed filters (WHEREs) are collected
  3. All used tables are collected from the expressions and filters to generate the FROM clause
  4. All links between the used tables are collected to generate the joins in the WHERE clause
  5. All non-aggregating expressions are added to the GROUP BY clause

If more than one table is used, the generator will automatically gather all available links between this tables and add them to the statements. If one or more tables can't be linked to the others (because there is no defined or imported link between them and the others), the generator will stop and raise an error. Selecting values from multiple tables without links is not supported!

Though instantOLAP generates statements in the ANSI SQL/92 syntax, some SQL features are still database-dependent:

To cover these features, the database allows to configure most of the database-dependent properties (concat-operator, maximum value count for IN, usage of aliases) in their definition. Also, for the most common database-types these settings are already pre configured and will be used automatically when a pre-configured database is detected.

Only the custom-functions and -aggregation have to be inserted manually into the SQL-expressions by using the SQL Pass-through.

Using the Web-Frontend
Using the Workbench
Using the Query-Editor
Using the Config-Editor
Query properties
Chart properties
Configuration properties
Expressions
Formats
SQL-Expressions
SQL-Expressions in instantOLAP
Syntax