Microsoft Developer Network > Forenhomepage > Data Mining > Comparing a specification table to a results table
Stellen Sie eine FrageStellen Sie eine Frage
 

FrageComparing a specification table to a results table

  • Dienstag, 30. Juni 2009 09:26MartynCompton TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    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?