sql sort help required plz

barnyb3

Registered User.
Local time
Today, 12:26
Joined
Apr 21, 2008
Messages
11
i am trying to construct a report and need two of three fields sorted

the fields are project(asc)
risk
hazard(product of two fields in a table called risk)(desc)



sql

SELECT Risk.Description, Project.ProjectName, Project.ProjectID, [Risk]![Likelihood]*[Risk]![Impact] AS Hazards
FROM (Project INNER JOIN Task ON Project.[ProjectID] = Task.[ProjectID]) INNER JOIN Risk ON Task.[TaskID] = Risk.[TaskID]
ORDER BY Project.ProjectName, [Risk]![Likelihood]*[Risk]![Impact] DESC;
 
thank you for the reply

I now get a pop up asking for hazards parameter value

barny
 
the field hazards is not in a table

i created the field using
Hazards: [Risk]![Likelihood]*[Risk]![Impact]

barny
 
Problem sorted thank you for the prompt reply and your time.
 
solution

SELECT Risk.Description, Project.ProjectName, Project.ProjectID, ([Risk]![Likelihood]*[Risk]![Impact]) AS Hazards
FROM (Project INNER JOIN Task ON Project.[ProjectID] = Task.[ProjectID]) INNER JOIN Risk ON Task.[TaskID] = Risk.[TaskID]
ORDER BY Project.ProjectName, ([Risk]![Likelihood]*[Risk]![Impact]) DESC;


I made changes using the grouping function
I deleted then remade the hazards field from the report
The sql seems to have remained the same as it was initially so I am lead to beleive that it was a misconception when using the wizard to set up the report
I am using access2007 and have no real knowledge on the subject.
I have a premonition that i'll probably return to this forum though.
All the best:)
 

Users who are viewing this thread

Back
Top Bottom