A
anil
I have following tables and query with example data
tblGroup - GroupID ,GroupName
1 , GTP1
2 , GTP2
tblParameter -ParameterID , ParameterName
1, BOD
2, pH
3, SS
4, TP
tblGroup_Par - Group_ParID, GroupId, ParameterID
1, GTP1, BOD
2, GTP1, SS
3, GTP1, pH
4, GTP2, BOD
5, GTP2, SS
6, GTP2, TP
qryWW - SampleID, SiteName,ParameterID.
101, TT1, BOD, SS, pH (in crosstab as example)
102, TT2, BOD, SS, TP
Now combining all these tables and query,I want the Final results as
(from the following query)
101, TT1, GTP1
102, TT2, GTP2
using the query
SELECT DISTINCT [TempqryWW].Location, [TempqryWW].SiteCode,
[TempqryWW].WWMonth, [TempqryWW].WWYear, [TempqryWW].SampleID,
[TempqryWW ].ParameterName, tblGroup.GroupName
FROM (tblGroup_Parameter INNER JOIN tblGroup ON
tblGroup_Parameter.GroupID = tblGroup.GroupID) INNER JOIN [TempqryWW]
ON tblGroup_Parameter.ParameterID = [TempqryWW].ParameterId
but,it gives me result as
101,TT1,GTP1
101,TT1,GTP2
102,TT1,GTP1
102,TT1,GTP2
Can someone please help me in getting the result proper.
Thanks
Anil
tblGroup - GroupID ,GroupName
1 , GTP1
2 , GTP2
tblParameter -ParameterID , ParameterName
1, BOD
2, pH
3, SS
4, TP
tblGroup_Par - Group_ParID, GroupId, ParameterID
1, GTP1, BOD
2, GTP1, SS
3, GTP1, pH
4, GTP2, BOD
5, GTP2, SS
6, GTP2, TP
qryWW - SampleID, SiteName,ParameterID.
101, TT1, BOD, SS, pH (in crosstab as example)
102, TT2, BOD, SS, TP
Now combining all these tables and query,I want the Final results as
(from the following query)
101, TT1, GTP1
102, TT2, GTP2
using the query
SELECT DISTINCT [TempqryWW].Location, [TempqryWW].SiteCode,
[TempqryWW].WWMonth, [TempqryWW].WWYear, [TempqryWW].SampleID,
[TempqryWW ].ParameterName, tblGroup.GroupName
FROM (tblGroup_Parameter INNER JOIN tblGroup ON
tblGroup_Parameter.GroupID = tblGroup.GroupID) INNER JOIN [TempqryWW]
ON tblGroup_Parameter.ParameterID = [TempqryWW].ParameterId
but,it gives me result as
101,TT1,GTP1
101,TT1,GTP2
102,TT1,GTP1
102,TT1,GTP2
Can someone please help me in getting the result proper.
Thanks
Anil