G
Guest
Hello,
I have a primary table populated by input data and update queries that
provide two numeric scores for ranking landslides. The first score is a
hazard score, and the second is a STIP score. I am using an SQL statement to
rank the scores according to severity. The SQL works for separate queries,
but I cannot get the Report to read the data from more than one query. When
I try to combine them in the following way, I get a syntax error:
SELECT HazScore,
(SELECT COUNT(*)
FROM PrimarySlideTable T1
WHERE T1.HazScore>T.HazScore)+1
AS HazRank
From PrimarySlideTable T
ORDER BY HazScore DESC,
SELECT STIP_Score,
(SELECT COUNT(*)
FROM PrimarySlideTable T1
WHERE T1.STIP_Score>T.STIP_Score)+1
AS STIPRank
From PrimarySlideTable T
I'm not sure if this is allowed in Access, or if there is another way to put
two sets of rankings in a report, or if I just don't know the proper syntax.
Thanks,
Curran Mohney
I have a primary table populated by input data and update queries that
provide two numeric scores for ranking landslides. The first score is a
hazard score, and the second is a STIP score. I am using an SQL statement to
rank the scores according to severity. The SQL works for separate queries,
but I cannot get the Report to read the data from more than one query. When
I try to combine them in the following way, I get a syntax error:
SELECT HazScore,
(SELECT COUNT(*)
FROM PrimarySlideTable T1
WHERE T1.HazScore>T.HazScore)+1
AS HazRank
From PrimarySlideTable T
ORDER BY HazScore DESC,
SELECT STIP_Score,
(SELECT COUNT(*)
FROM PrimarySlideTable T1
WHERE T1.STIP_Score>T.STIP_Score)+1
AS STIPRank
From PrimarySlideTable T
I'm not sure if this is allowed in Access, or if there is another way to put
two sets of rankings in a report, or if I just don't know the proper syntax.
Thanks,
Curran Mohney