Microsoft Developer Network > 포럼 홈 > Data Mining > Comparing a specification table to a results table
질문하기질문하기
 

질문Comparing a specification table to a results table

  • 2009년 6월 30일 화요일 오전 9:26MartynCompton 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I would like to know if there is a "simple" way to compare a specification table with a results tables contents.
    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?
    I have stripped the table design down to it's bare bones below.
    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
    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.
    What I want to do is compare the results values against the specification table requirements.
    Any gurus with a suggestion on the most efficient way to do this?