G
Guest
I have a query that looks at check boxes in my database, it says the following:
WHERE [Aboriginal] = TRUE
UNION ALL
SELECT UniqueID, "Reintegration to High School" As Behaviour
FROM Students
WHERE [OutcomeReintegration] = TRUE
UNION ALL
SELECT UniqueID, "Special School/Class Placement"
FROM Students
WHERE [OutcomeSpecialSchool] = TRUE
UNION ALL
SELECT UniqueID, "Community Education Program"
FROM Students
WHERE [OutcomeCommunityEduction] = TRUE
UNION ALL
SELECT UniqueID, "TAFE/ALESCO"
FROM Students
WHERE [OutcomeTAFE] = TRUE
UNION ALL
SELECT UniqueID, "Work"
FROM Students
WHERE [OutcomeWork] = TRUE
UNION ALL
SELECT UniqueID, "Juvenile Justice"
FROM Students
WHERE [OutcomeJJ] = TRUE
UNION ALL
SELECT UniqueID, "HSLO"
FROM Students
WHERE [OutcomeHSLO] = TRUE
UNION ALL
SELECT UniqueID, "Moved out of Region"
FROM Students
WHERE [OutcomeMoved] = TRUE
UNION ALL
SELECT UniqueID, "Left School/Unemployed"
FROM Students
WHERE [OutcomeLeftSchool] = TRUE
UNION ALL
SELECT UniqueID, "Home Duties (Married or Parenting)"
FROM Students
WHERE [OutcomeHomeDuties] = TRUE
UNION ALL
SELECT UniqueID, "Training Provider"
FROM Students
WHERE [OutcomeTraining] = TRUE
UNION ALL SELECT UniqueID, "Referred to District"
FROM Students
WHERE [OutcomeDistrict] = TRUE;
It works and runs the query however it's not what I'm after, what I want it
to say is, if the check box "Aboriginal" is checked then show me the outcome
but what I've written actually shows me the outcomes as well so I think I
need a query that says if it equals this then show this but I'm not sure how
to do that, if someone could help I would appreciate it.
M
WHERE [Aboriginal] = TRUE
UNION ALL
SELECT UniqueID, "Reintegration to High School" As Behaviour
FROM Students
WHERE [OutcomeReintegration] = TRUE
UNION ALL
SELECT UniqueID, "Special School/Class Placement"
FROM Students
WHERE [OutcomeSpecialSchool] = TRUE
UNION ALL
SELECT UniqueID, "Community Education Program"
FROM Students
WHERE [OutcomeCommunityEduction] = TRUE
UNION ALL
SELECT UniqueID, "TAFE/ALESCO"
FROM Students
WHERE [OutcomeTAFE] = TRUE
UNION ALL
SELECT UniqueID, "Work"
FROM Students
WHERE [OutcomeWork] = TRUE
UNION ALL
SELECT UniqueID, "Juvenile Justice"
FROM Students
WHERE [OutcomeJJ] = TRUE
UNION ALL
SELECT UniqueID, "HSLO"
FROM Students
WHERE [OutcomeHSLO] = TRUE
UNION ALL
SELECT UniqueID, "Moved out of Region"
FROM Students
WHERE [OutcomeMoved] = TRUE
UNION ALL
SELECT UniqueID, "Left School/Unemployed"
FROM Students
WHERE [OutcomeLeftSchool] = TRUE
UNION ALL
SELECT UniqueID, "Home Duties (Married or Parenting)"
FROM Students
WHERE [OutcomeHomeDuties] = TRUE
UNION ALL
SELECT UniqueID, "Training Provider"
FROM Students
WHERE [OutcomeTraining] = TRUE
UNION ALL SELECT UniqueID, "Referred to District"
FROM Students
WHERE [OutcomeDistrict] = TRUE;
It works and runs the query however it's not what I'm after, what I want it
to say is, if the check box "Aboriginal" is checked then show me the outcome
but what I've written actually shows me the outcomes as well so I think I
need a query that says if it equals this then show this but I'm not sure how
to do that, if someone could help I would appreciate it.
M