Defining and Editing SQL Statements
Sisense makes it easy to edit custom tables. You can use SQL to customize the columns contained within a custom table.
When you edit a custom table, any changes you make are saved when you click Save unless the expression did not successfully parse. In this case, you are prompted to save a draft of the invalid expression.
If you save the invalid expression, Sisense continues to use the last valid expression that was saved when building an ElastiCube , but the next time you open a preview of the table, the invalid expression will be displayed. This allows you to continue building working ElastiCube s while letting you save incomplete expressions for later.
If you wish to display the last valid expression, you can click the Refresh button in the menu bar and then press Save.
To edit a custom table's SQL:
-
Select the custom table you want to edit and click .
The custom table area is displayed
-
Enter SQL statements to access tables and fields that exist in the schema. See related topics for more details on SQL Quick Reference and Data Functions for Custom Tables and Fields.
-
To view results based on the SQL statement, click .
Note:
At least one build including the relevant base table must have been completed in order to preview results.
-
Click Save to save your changes.
Tips
- Press Ctrl + Space to complete an SQL statement.
- To make it easier to access table fields, give the table name an alias, and reference the alias to bring up the related fields. For example Select A. From table as A.
- You can add comments in expressions by using the "-" for a single line or /.../ for blocks.
- A good reference on compatible SQL commands is available on Microsoft MSDN.
Note:
Sisense does not support Boolean data types.