hi will im having too much with subquery and i aint making the whole things run. anyway i have a master and detail tables with aggregate and expression column. now i need to create a parameter to filter master table and such its underlying details will be filtered too from the parameter value given to the master table.
pls see tsql code below where im going to filter row in master table where pk_assessmentid=39
view relation diagramCode:select * from tblassessmentMaster where pk_assessmentID=39 (SELECT dbo.tblAssessmentDetails.fk_scopeID, SUM(dbo.tblAssessmentDetails.scaleValue) AS sumOfScaleValue, COUNT(dbo.tblAssessmentDetails.fk_scopeID) AS countOfScope, dbo.tblcriteria.criteriaDescription FROM dbo.tblAssessmentDetails INNER JOIN dbo.tblcriteria ON dbo.tblAssessmentDetails.fk_criteriaID = dbo.tblcriteria.criteriaID GROUP BY dbo.tblAssessmentDetails.fk_scopeID, dbo.tblcriteria.criteriaDescription)
tnx.



Reply With Quote