Adding a Query
Entering Database Queries
- Add SQL queries by pressing the icon and select the variable.
- Modify a query after selecting it.
- Delete a query after selecting it.
This query will use keywords to take into account the values chosen in the drop-down lists : VALn for the value in the drop-down list number n.
The SQL query supported by the tool is of the type :
SELECT ATTRIBUTE FROM TABLE WHERE CONDITION.
For each variable, it is possible to fill in a label. This label will appear in the data card information, if there is no label, the name of the variable will be displayed.
For example :
Case with 2 drop-down lists displaying families and sub-families.
- Request for families: SELECT FAMILY FROM TABLE_FAMILY
- Query for subfamilies : SELECT SUB_FAMILY FROM TABLE_FAMILY WHERE FAMILY='VAL1'
Case with 4 lists.
- select distinct FAMILY from TABLE_FAMILY
- select distinct SUBFAMILY from TABLE_FAMILY where FAMILY='VAL1'.
- select distinct SUBFAMILY_2 from TABLE_FAMILY where FAMILY='VAL1' and SUBFAMILY='VAL2'
- select distinct SUBFAMILY_3 from TABLE_FAMILY where FAMILY='VAL1' and SUBFAMILY='VAL2' and SUBFAMILY_2='VAL3'
The variables VAL1,VAL2... correspond to the drop-down menu 1,2,...