Skip to content

Queries on datasets

Introduction

Data related to a physical dataset can only be accessed in read only mode by entering SQL queries in the form’s cells.

For more details on queries, see Query.

Dataset access syntax

The syntax for accessing a dataset partition is as follows: SELECT FROM

WHERE .

The function to retrieves the

value is: DATASETPARTITION(codWorkspace, codDataset, [codRaccolta], [codScenario], [codPeriodo], [codAzienda]).

For example, with the syntax SELECT * FROM ${DATASETPARTITION("001", "000015")}, elements 001 and000015 are a workspace code and a dataset code, respectively.

IMPORTANT: data read via queries are visible to all users. The user defining the query must therefore ensure that it does not retrieve data that violates the user rights set in the application.

Execution of queries

Queries set on the form’s cells are run when the form is opened. If the DATASETPARTITION function does not find any partition corresponding to the query parameters, the query cannot be run and the system displays an error message.

To prevent errors of this type, it is possible to specify a table or partition name to be used for the query as the last parameter of the DATASETPARTITION syntax.

For more details on the function, see The Datasetpartition function .