Comparing a specification table to a results tableI would like to know if there is a &quot;simple&quot; way to compare a specification table with a results tables contents.<br/>I have managed to do this in code by looping and capturing the name of the field for use in a repeating query but just maybe there is a simpler (and faster) way within the SQL language?<br/>I have stripped the table design down to it's bare bones below.<br/>The specification table has the fields - fieldName, Min, Max.  Each row in the table would have a fieldName and a min max for that fieldName<br/>The results table has the fields - Id, fieldNameA, fieldNameB, fieldNameC...etc. Each row has the sample id and then the results for the relevant fieldNameX.<br/>What I want to do is compare the results values against the specification table requirements.<br/>Any gurus with a suggestion on the most efficient way to do this?<br/>© 2009 Microsoft Corporation. All rights reserved.Tue, 30 Jun 2009 09:26:06 Zd620dbc0-8b47-412b-9c67-234cc296f6cfhttp://social.msdn.microsoft.com/Forums/en-US/sqldatamining/thread/d620dbc0-8b47-412b-9c67-234cc296f6cf#d620dbc0-8b47-412b-9c67-234cc296f6cfhttp://social.msdn.microsoft.com/Forums/en-US/sqldatamining/thread/d620dbc0-8b47-412b-9c67-234cc296f6cf#d620dbc0-8b47-412b-9c67-234cc296f6cfMartynComptonhttp://social.msdn.microsoft.com/Profile/en-US/?user=MartynComptonComparing a specification table to a results tableI would like to know if there is a &quot;simple&quot; way to compare a specification table with a results tables contents.<br/>I have managed to do this in code by looping and capturing the name of the field for use in a repeating query but just maybe there is a simpler (and faster) way within the SQL language?<br/>I have stripped the table design down to it's bare bones below.<br/>The specification table has the fields - fieldName, Min, Max.  Each row in the table would have a fieldName and a min max for that fieldName<br/>The results table has the fields - Id, fieldNameA, fieldNameB, fieldNameC...etc. Each row has the sample id and then the results for the relevant fieldNameX.<br/>What I want to do is compare the results values against the specification table requirements.<br/>Any gurus with a suggestion on the most efficient way to do this?<br/>Tue, 30 Jun 2009 09:26:06 Z2009-06-30T09:26:06Z