Also - What would be a query to get all good PI tags that are in our PI AF under a certain point in the tree?
Check out this thread:
PI Point - Attribute 'pairs'
David Moler's suggestion is probably the best but you can use my code to give you an idea of one potential way to do it.
Edit: Didn't realize this was under the SQL Technologies Subspace. My bad! I'll look in to a SQL solution.
This should do the trick. You will need to substitute out your database. In addition, you'll want to change your path.
SELECT eh.Path, eh.Name, ea.Name, dr.Name
FROM NuGreen.Asset.ElementHierarchy eh
INNER JOIN NuGreen.Asset.ElementAttribute ea ON ea.ElementID = eh.ElementID
INNER JOIN System.AF.Plugin dr on ea.DataReferencePluginID = dr.ID
WHERE eh.Path LIKE '\NuGreen\Houston\%'
AND dr.Name = 'PI Point'
OPTION (ALLOW EXPENSIVE)
Retrieving data ...