AnsweredAssumed Answered

Using value of PI-tag in query

Question asked by nigo on Jan 19, 2015
Latest reply on Feb 13, 2015 by nigo

Hi


I managed to make a table in an MS access database containing targets, upper and lower limits for different materialnumbers. I'd like to link that to the current material number we are producing which is held in the tag EC$MaterialNumber


So how should I make the query? I'm a complete noob in database queries. Here's the query for just getting the whole content:


-------------


SELECT RGSizeSpec.`Material number`, RGSizeSpec.`Lower limit`, RGSizeSpec.Target, RGSizeSpec.`Upper limit`  FROM `C:\Users\NKYH\Documents\TargetsForRG`.RGSizeSpec RGSizeSpec 


-------------


Obviously I could get the value for a given material number by putting in this eg.: WHERE (RGSizeSpec.`Material number`='6455018_020'), which works fine in getting me the values for the material number 6455018_020.


But how do I make that dynamic so the value of my filter would change with the value of the PI-tag EC$MaterialNumber?


I hope it make sense...

Outcomes