Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Error code when I try to run query

Author  Topic 

gmag47
Starting Member

3 Posts

Posted - 2005-11-02 : 09:34:48
This is the error code I get:
Expected 'Case'
/new web site/pol/HCMAP/Merit_Principle_Report.asp, line 41, column 7

and here's my code:

SELECT "1_Recruitment_was_appropriately_targeted","2_Recruitment_produced_sufficient number_of_status_applicants","3_Recruitment_produced_sufficient_number_of_non_status_applicant","4_Certificate_referral_list_was_issued_in_a_timely_manner","5_Length_of_open_period_for_announcement_was_reasonable_based_on_the_type_of_job_number_of_potential_candidates","6_Operational_procedures_addressed_issues_of_tardy_applicatons","7_If_applicable_late_applications_from_10_point_verterans_preference_eligibles_are_maintained","8_These_applicatns_were_notified_within_appropriate_time_frame","9_KSAs_crediting_plans_are_based_on_the_job_requirements_and_were_effective_in_identifying_best_qualified_candidates","10_CTAP_ICTAP_RPL_candidates_received_proper_consideration,11_If_applicable_recruitment_adheres_to_ACWA_Luevano_Consent_Decree_regulatory_compliance"
SUM(Average) AS [Total Average]
SUM(Merit_Principle+Merit_Promotion)
AS [Total Average in Percent]
FROM Merit_Principle, Merit_Promotion INNER JOIN Merit_Principle_Report
ORDER BY SUM(Merit_Principle+Merit_Promotion) DESC

Glen S. Magwood Sr

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2005-11-02 : 17:06:51
A few problems:

1. you're missing quotes between item 10 and 11
2. then you're missing a comma before SUM(Average) and between SUM(Average) AS [Total Average] and SUM(Merit_Principle+Merit_Promotion)
3. you've got no "ON " clause for your join
4. and finally, your join expression is not supported in Access

but apart from that, your query is perfectly ok...

try this
SELECT "1_Recruitment_was_appropriately_targeted",
"2_Recruitment_produced_sufficient number_of_status_applicants",
"3_Recruitment_produced_sufficient_number_of_non_status_applicant",
"4_Certificate_referral_list_was_issued_in_a_timely_manner",
"5_Length_of_open_period_for_announcement_was_reasonable_based_on_the_type_of_job_number_of_potential_candidates",
"6_Operational_procedures_addressed_issues_of_tardy_applicatons",
"7_If_applicable_late_applications_from_10_point_verterans_preference_eligibles_are_maintained",
"8_These_applicatns_were_notified_within_appropriate_time_frame",
"9_KSAs_crediting_plans_are_based_on_the_job_requirements_and_were_effective_in_identifying_best_qualified_candidates",
"10_CTAP_ICTAP_RPL_candidates_received_proper_consideration",
"11_If_applicable_recruitment_adheres_to_ACWA_Luevano_Consent_Decree_regulatory_compliance",<----
SUM(Average) AS [Total Average],<----
SUM(Merit_Principle+Merit_Promotion) AS [Total Average in Percent]
FROM Merit_Principle, Merit_Promotion, Merit_Principle_Report
WHERE Merit_Promotion.bla = Merit_Principle_Report.bla
ORDER BY SUM(Merit_Principle+Merit_Promotion) DESC


Formatting your SQL can make troubleshooting a LOT easier.

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page
   

- Advertisement -