A query of a database allows the user to extract a record (or records) of a data using logical statements on a field (or fields) stored within a specific database.  With InfoWater, the user is able to select network components and related data by creating logical query statements through the user-friendly DB Query feature.

Using Queries in InfoWater

DB Queries are a time-saving tool that can be used for:

  • Activating a portion of the network for simulation, typically as a facility set associated with a custom scenario (see Facility Manager).

  • Creating a domain to highlight a subset of network components (see Domain Manager.)

  • Restricting the database records that are available for editing using the Database Editor.

  • Customizing the map display by color-coding network components (see Query Sets).

  • Creating Selection Sets (see Selection Sets)

  • Output Relates (stored output result data) can also be associated with DB Queries which are important when creating Query Reports.

  • Restricting model results to identify network components whose modeled performance (pressures, flows, etc.) meet or do not meet user specified criteria (e.g., nodes where pressure drops below 20 psi) using the Output Report Manager.

You may develop your own query statements or use one of the pre-defined InfoWater special queries to select portions of your distribution system model.



To build a query statement, do the following:

  • From the InfoWater Browser -> Operation tab click on DB Query.

  • Right click and choose the New command, and specify an ID and description (ID no more than 20 characters, no spaces and Description no more than 60 character, may contain spaces) and click on OK.

  • Choose the Element Type that you want to create a query for ( Choose from Junctions, Pumps, Tanks, Reservoirs, Valves and Pipes) then Click on OK.

  • Click on the Query Builder icon to launch the Query Builder dialog box.

  • Choose the appropriate data tab from among the three tabs at the top of the Query Builder dialog box.

  • Click on the column for the data type you want to query on.

  • Choose the operator from the functions and operator section.

  • Enter the value that you want as your second operand in the Value Box.

  • Click on Add to add the query in the Statement section of the Query Builder.

  • Click on Validate to validate your query.

  • Click on OK to save your query and exit from the query builder dialog box.

To create a query set, from the InfoWater Pro Browser -> Operation tab highlight the Query Set folder and right mouse click and select New.  Provide a Query set ID and a description for the new query set.  When created, the user is able to add or create the DB Queries that will comprise the Query Set. 

ID & Description

The query set ID and description is displayed here.

Tip 1: In InfoWater Pro an ID is up to 32 characters long, no spaces and no symbol characters such as #, % etc. (dash "-" and underscore "_" are OK).

Tip 2: Description is up to 60 characters with spaces, numbers  and symbol characters.

Tip 3: A good description always helps identify the Query Set.

Associated DB Queries & Color

This box shows the current DB Queries assigned to the highlighted query set.  To adjust the color associated with a DB Query, highlight the desired query and click on the color box under the Association Details section.  When the color palette box appears, select a color and click OK.

    • Delete - Use this button to remove a DB Query from the active query set. Select the DB Query you want to remove and click on the Delete Button.

    • Color - Use this button to assign a new color to a DB Query in the active query set. Select the DB Query and click on the Color Button. Choose the color and click on OK to associate the color with the DB Query.

    • Insert - Use this button to insert a DB Query into the active query set.

Association details

    • Color - Launch the color palette by clicking here. Select the color you want to associate with the DB Query and click on OK.

    • DB Query - Select a previously created database query from the drop down box to assign to the query set.  Once the desired DB Query is chosen, it is Automatically associated with the Query Set.

    •   Create DB Query - This launches the DB Query dialog box allowing the user to create a new database query.