BQL Demystified - Part II
One of the most powerful but underutilized features of Niagara AX is BQL queries. John Sublett wrote an excellent post on Niagara-Central called BQL Demystified - Part I that covers basic syntax and meaning. This post will extend John’s post by demonstrating the Query Builder, running custom queries, and other examples.
The example we’re going to try is how to view the name of all Numeric Points whose name starts with “SpaceTemp”. Open the Query Builder (File>Open>Query Builder) and configure it as shown below.

Example of input data for a Niagara AX BQL Query
After pressing OK you’ll get a table wtih the resulting query. To view the generated query, hold CTRL and press L (this shows your current ORD). You should see somethign similar to this:
station:|slot:/|bql:select navOrd from control:NumericPoint where name = 'SpaceTemp'
The cool part is that you can write and run your own query by copying it into the Open Ord dialog (CTRL+L).
More Examples:
View all Numeric Points whose name contains the word “Outside”:
station:|slot:/|bql:select * from control:NumericPoint where name like '*Outside*'
View the ord of all Numeric Points that are > 85:
station:|slot:/|bql:select slotPath from control:NumericPoint where out.value > 85.0
View the name and ord of all Control Points whose status is not OK:
station:|slot:/|bql:select navName,ord from control:ControlPoint where !status.isOk