I have the following query and I want to change it slightly to that instead of all scores being calculated, I can have a parameter where I have the following groups: 0-4, 5, 6-7, 8-10.
Can I do that from within this same query?
SELECT Year3TempDistressFactorsPop.[1Score], Year3TempDistressFactors.[2Score], Year3TempDistressFactors.[3Score], Year3TempDistressFactors.[4ScoreCounty], Year3TempDistressFactors.[5Score], Year3TempDistressFactors.[7Score], Year3TempDistressFactors.[8Score], Year3TempDistressFactors.[9Score], Consolidate.UnitName, ([1Score]+[2Score]+[3Score]+[4ScoreCounty]+[5Score]+[7Score]+[8Score]+[9Score]) AS Total, Consolidate.CountyCd, Consolidate.LocalUnitType
FROM (Consolidate INNER JOIN Year3TempDistressFactors ON Consolidate.ConsolidateID = Year3TempDistressFactors.ConsolidateID) INNER JOIN Year3TempDistressFactorsPop ON Consolidate.ConsolidateID = Year3TempDistressFactorsPop.ConsolidateID
WHERE (((Consolidate.LocalUnitType)="0"));
Can I do that from within this same query?
SELECT Year3TempDistressFactorsPop.[1Score], Year3TempDistressFactors.[2Score], Year3TempDistressFactors.[3Score], Year3TempDistressFactors.[4ScoreCounty], Year3TempDistressFactors.[5Score], Year3TempDistressFactors.[7Score], Year3TempDistressFactors.[8Score], Year3TempDistressFactors.[9Score], Consolidate.UnitName, ([1Score]+[2Score]+[3Score]+[4ScoreCounty]+[5Score]+[7Score]+[8Score]+[9Score]) AS Total, Consolidate.CountyCd, Consolidate.LocalUnitType
FROM (Consolidate INNER JOIN Year3TempDistressFactors ON Consolidate.ConsolidateID = Year3TempDistressFactors.ConsolidateID) INNER JOIN Year3TempDistressFactorsPop ON Consolidate.ConsolidateID = Year3TempDistressFactorsPop.ConsolidateID
WHERE (((Consolidate.LocalUnitType)="0"));