How do I use the query builder?

Top   « Previous  Next »

In the Define Criteria window you can write your queries using the easy to understand Query Builder, or if you're comfortable with writing SQL, you can edit it directly below. The SQL Syntax created in the bottom window is always used to run the queries.



Query builder - overview


Click the link <Click here to add a new condition >


The query builder uses drop down menus which you select to build your query.


The Query Builder writes SQL in the SQL Editor as you create it, and you can also write SQL directly in to the SQL Editor tab below and test it.



Query builder - 2



Click the red colored Customers.CustomerID (Table.Field) to select the appropriate field, in this case it will be ContactName


Query builder - 3



Next, select the appropriate operator for this query, in this case it is Starts with


Query builder - 4



Next we select the User Input item from the drop down menu. The User Input item is used for the end-user as their input field when they send their queries from their mobile device. You can add more conditions and use multiple User Input items combined with values or dates.



Query builder - 5



Now we have a sentence which reads:


Choose records where all of the following apply: Where Customers Contact Names start with [User Input]


Note, you can also change how records are chosen with the drop down menu item like below


Query builder - 6a



Another menu is also available by clicking the number next to each condition as shown below.


This allows you to Add, Delete, Enable/Disable and Add a bracket to the query.


Query builder - 6b



As the wizard has been completed, the SQL statements have been written automatically below and can be edited directly. Any queries which are run, are always based on the manual SQL statement.


Query builder - 6