Queries Tab - Defining your Query
Queries Tab - Designing a Query
Now to design a query to retrieve a list of available products filtered by area.
| 1. | Move to the ‘Queries’ tab. |

| 2. | Click on ‘New Query’ to open up the query designer. |

| 3. | Here you’ll need to enter a name for the query. |
| o | Eg. GetProductsByArea |
| 4. | And optionally a meaningful description. |
| 5. | Click ‘Query Wizard’ to open the query designer. |

| 6. | Pull down the drop down list and select the ‘Products’ table, then click ‘Next’. |

| 7. | This Web Service will bring back ‘ID’, ’Product’, and ‘Price’, so make sure those columns are checked, then press ‘Next’. |

| 8. | The final screen of the wizard is where you specify any filters you want placed on the data. (If these fields are left clear, the query will return all available records). |
| o | In ‘Columns’ box select ‘Region’ |
| o | In the ‘Operator’ box select ‘Equals’ |
| o | In the ‘Value’ box select ‘A web service parameter’ |
| o | Click ‘Add’to confirm the constraint. |
| 9. | Finally click ‘Finish’ to return to the ‘Queries’ window where you can see the SQL has been generated. ![]() |
| 10. | To test the query, enter an area in the ‘Value’ field for ‘in_region’, and then click ‘Test’. Possible values are North, East, South and West. Entering ‘North’ brings back the following records. |
