Creating Queries in enQuiry

Top  Previous  Next

The "Screen Components" section illustrates the basic functions available in enQuiry. The functions are all explained with a brief description. This section provides an insight into the creation of queries using the enQuiry tool to tailor specific information, which can be re-used as and when required by combining it with the "Create Custom View" function.

 

The objective of enQuiry is to create specific views of the underlying data without the need to understand technical language such as Structured Query Language. A simple set of check boxes can be used to choose the data required and then by running the query the system links the information together to produce the output at the bottom of the screen.

 

The following example shows how this works in practice:

 

enQuiry_Example_Query

 

As you can see the information from the contact has automatically been added to the address details. Once the enquiry_run_refresh icon has been pressed the resulting output of the query is displayed at the bottom of the display.

 

You will notice 2 tabs: One is the "Query Result" tab where the results are displayed and the other tab contains the "SQL Code" tab which actually shows the SQL Server query. This can be run in SQL Server management studio or it can be changed within enVisual if needed.

 

This means that both advanced and none-advanced users alike can use the query tool to create simple or advanced queries within enVisual.

 

The SQL generated in this case is as follows:

 

SELECT [Contact Details].[Entity Code], [Contact Details].[First Name],

 [Contact Details].[Last Name], [Address Details].[Address Line 1],

 [Address Details].[Address Line 2], [Address Details].[Address Line 3],

 [Address Details].[Address Line 4]

FROM enSelect.QueryBuilder.[Contact Details] [Contact Details] Inner Join

 enSelect.QueryBuilder.[Address Details] [Address Details] On

   [Contact Details].[Entity Link Field] =

   [Address Details].[Entity Link Field]

 

For advanced users, as you can see the in SQL language the joins are automatically implied, and this avoids the need for further development time. However, if more sophistication is required for complex queries it is possible to generate the initial SQL and then amend or enhance it as required.