
475 So.2d 863 (1985)
The PERSONNEL BOARD OF JEFFERSON COUNTY, Alabama, a public agency, etc.; and James Earl Vaughn
v.
Mel BAILEY, as Sheriff of Jefferson County, Alabama.
Civ. 4657-X.
Court of Civil Appeals of Alabama.
May 22, 1985.
Rehearing Denied June 26, 1985.
Certiorari Denied September 20, 1985.
*865 David P. Whiteside, Jr., Michael L. Hall, and Bruce H. Wynn of Johnston, Barton, Proctor, Swedlaw & Naff, Birmingham, for appellant.
Terry McElheny of Dominick, Fletcher, Yeilding, Wood & Lloyd, Birmingham, for appellee.
Alabama Supreme Court 84-1061.
BRADLEY, Judge.
This is an appeal from a declaratory judgment action.
James Earl Vaughn, deputy sheriff in the Jefferson County Sheriff's Department, filed a grievance with the Jefferson County Personnel Board (Board), complaining that Sheriff Mel Bailey had transferred him from patrol duty to jail duty in the sheriff's department for disciplinary reasons. Vaughn alleged in his complaint that he was disciplined because of a recent complaint filed by a citizen against him, which complaint was not sustained.
The Board's personnel director ruled that Vaughn's complaint was grievable. Bailey did not appeal the director's ruling to the Board, although Board review of the ruling was available. The grievance committee then heard the merits of Vaughn's complaint and entered a ruling in Vaughn's favor, ordering that Vaughn be reinstated to the patrol division.
On September 13, 1983 Bailey filed a "Complaint for Declaratory Judgment and Request for Preliminary Injunction," asking that the circuit court enter a declaratory judgment that matters of job assignment, placement, and transfer are prerogatives of the sheriff and not subject to review by the Board or grievance committee.
On December 2, 1983 Bailey amended his complaint, asking further that the circuit court issue a declaratory judgment that the grievance committee's decision was erroneous.
The trial court entered a partial summary judgment, finding that Vaughn's complaint was properly a matter for the grievance committee's consideration. Bailey (appellee/cross-appellant) cross-appeals from this portion of the circuit court's judgment.
Subsequently, the trial court entered a final judgment ruling that the grievance committee's decision was arbitrary and capricious. The Board and Vaughn (appellants/cross-appellees) appeal from this portion of the court's order.
Before turning to the merits of this case, we first consider cross-appellees' motion to dismiss Bailey's cross-appeal. Cross-appellees contend that Bailey was the prevailing party below, even though the court ruled adversely on the grievability issue, and that he, therefore, cannot appeal. Our courts have stated that where a judgment is wholly in a party's favor and there is nothing prejudicial in the judgment no appeal *866 lies to the prevailing party. Hamrick v. Town of Albertville, 223 Ala. 216, 135 So. 326 (1931). Conversely, our courts have recognized that where a judgment is not wholly in a party's favor and contains adverse rulings prejudicial to a party, such party has a right to appeal. See, e.g., Price v. South Central Bell, 294 Ala. 144, 313 So.2d 184 (1975). See also Katz v. Red Top Sedan Service, Inc., 136 So.2d 11 (Fla.Dist. Ct.App.1962).
We conclude that Bailey has a right to cross-appeal the circuit court's finding on the grievability issue, because the court's decision could have a prejudicial effect on his authority to assign and discipline subordinates in his department. We now address Bailey's contentions in his cross-appeal.
Bailey argues that the circuit court erred in finding that Vaughn's complaint was a grievable matter subject to review by the grievance committee.
Rule 8.6 reads in part as follows:
"a) DEFINITION OF GRIEVANCE. A grievance is a wrong, real or fancied, considered by an employee as grounds for complaint. Matters dealing with classification, pay, compensation, examination, leave, discipline, and related actions specifically set forth in the Personnel rules and regulations, shall not be considered under grievance procedures, but shall be adjusted in accordance with the provisions set forth in these rules and regulations. Any question as to what constitutes a grievance or what should be processed as a matter subject to these rules and regulations, shall be determined by the Director, subject to the review of the Board."
Bailey interprets the phrase "specifically set forth in the [Board's] Rules and Regulations" as modifying only "related actions." Thus, he concludes that no disciplinary matters are subject to grievance committee review. Therefore, Bailey asserts that rule 8.6 does not apply to the case at bar since Vaughn alleged in his complaint that he had been transferred for disciplinary reasons.
The Board, however, interpreted the phrase "specifically set forth" as modifying all of the words in the sentence, i.e. "discipline," "classification," "pay," "compensation," "examination," and "leave." Thus, the Board concluded that rule 8.6 applied to Vaughn's complaint since no other Board rule specifically dealt with transfers for disciplinary reasons.
The circuit court agreed with the Board's interpretation of rule 8.6, finding "that matters of discipline, which are not specifically covered by other rules and regulations are subject to the grievance procedure established in rule 8.6."
We conclude that substantial deference should be given to an agency's interpretation of its own rules and regulations. See Hayes International Corp. v. McLucas, 509 F.2d 247 (5th Cir.1975). Further, "Where several words are followed by a [modifying] clause as much applicable to the first and other words as to the last, the clause should be read as applicable to all." 82 C.J.S. Statutes § 334 (1953) (footnote omitted) (quoted in White v. Knight, 424 So.2d 566 (Ala.1982)).
In the case sub judice, the phrase "specifically set forth" applies equally to all of the preceding words. Thus, it appears that the court correctly determined that rule 8.6 applied to Vaughn's complaint since no other provisions specifically dealt with transfers or reassignments for disciplinary reasons.
Moreover, we consider City of Bessemer v. Personnel Board, 420 So.2d 6 (Ala.1982), and City of Birmingham v. Personnel Board, 464 So.2d 100 (Ala.Civ.App.1984), controlling on the issue of the grievability of Vaughn's complaint. Both of the above cited cases dealt with rule 8.6 of the Jefferson County Personnel Board Rules and Regulations.
In City of Bessemer v. Personnel Board, supra, the supreme court found that the personnel director properly determined that employee's complaint about his transfer from sewer crew to another position was a *867 grievable matter. In City of Birmingham v. Personnel Board, supra, we considered a Birmingham police officer's complaint that he was transferred from the South Precinct to the North Precinct for disciplinary reasons to be a grievable matter.
These cases are factually similar to the case sub judice, and Bailey's attempts to distinguish them are unpersuasive. In both cases the court discussed, albeit briefly, the question of whether employee's particular complaint was grievable. We, therefore, consider these cases dispositive of Bailey's cross-appeal. The trial court properly granted Vaughn's and the Board's motion for summary judgment, finding that no genuine issue of material fact existed regarding whether Vaughn's complaint was a grievable matter under rule 8.6. We affirm this portion of the circuit court's order.
Cross-appellees, Vaughn and the Board, appeal from the circuit court's final judgment finding the grievance committee's decision reinstating Vaughn to patrol duty arbitrary and capricious. They contend that the circuit court lacked jurisdiction to entertain Bailey's amended complaint.
Bailey's amended complaint requested that the circuit court issue a declaratory judgment that the grievance committee's decision was erroneous and rendered without jurisdiction in that there was no evidence that Vaughn's transfer was for arbitrary, capricious, or discriminatory reasons. He urged that Vaughn was transferred due to his inability to perform patrol duties and not for any disciplinary reasons. Cross-appellees contend that Bailey's amended complaint improperly seeks direct review of the grievance committee's action.
We agree that a declaratory judgment proceeding may not be substituted for the remedy of appeal, certiorari, or mandamus as the method of direct review of an agency's or lower tribunal's orders. See e.g., Howle v. Alabama State Milk Control Board, 265 Ala. 189, 90 So.2d 752 (1956). Since a right of an appeal by an aggrieved party from the grievance committee's decision is not provided for by statute, common-law certiorari is the appropriate method of review of the grievance committee's decision. City of Birmingham v. Personnel Board, supra. Cross-appellees contend, however, that Bailey improperly substituted a complaint for declaratory relief for the remedy of common-law certiorari review.
The circuit court evidently did not treat Bailey's amended complaint as a request for declaratory relief, but, instead, treated it as a petition for writ of certiorari. The court stated in its final judgment, dated August 22, 1984, that its review of the grievance committee's decision was controlled by the standard of review applicable to administrative agencies' decisions. Thus, the court concluded that the grievance committee's decision would not be reversed unless it was made arbitrarily, capriciously, or in bad faith. Furthermore, cross-appellees, in their motion to alter, amend, or vacate the circuit court's judgment, stated that the court properly heard this matter under its certiorari powers. Review of the record convinces us that the parties agreed to proceed with the case on a certiorari-type review. We, therefore, conclude that the circuit court properly entertained Bailey's amended complaint under its certiorari power, and treated this matter as a petition for common-law writ of certiorari. We now consider whether the circuit court applied the correct standard of review and whether it properly reversed the grievance committee's decision.
Bailey cites several cases setting forth a standard of review that he contends should have been applied by the circuit court to the grievance committee's decision. For example, in Sexton v. Tuscaloosa County Civil Service Board, 426 So.2d 432 (Ala. Civ.App.1983), the standard of review to be applied by the circuit court to the Tuscaloosa Civil Service Board's decision was provided for by statute. Also, in Ex parte Morris, 263 Ala. 664, 83 So.2d 717 (1955), a statute again provided the standard of review applied to the Jefferson County Personnel Board's decision. In Ex parte Morris, supra, the statute provided for an appeal *868 from the Board's decision to a three-judge panel of the circuit court. The panel then reviewed the Board's decision to see if it was supported by substantial and legal evidence. These cases are, therefore, inapplicable to a common-law writ of certiorari review.
Instead, we find the standard of review set forth in Little Caesar's v. Alabama Alcoholic Beverage Control Board, 386 So.2d 224 (Ala.Civ.App.1979), rev'd on other grounds, 386 So.2d 228 (Ala.1980), applicable to the case sub judice. In Little Caesar's v. Alabama Alcoholic Beverage Control Board, supra, we stated that when proceedings of a lower tribunal are reviewed on common-law writ of certiorari the tribunal's order should be sustained if it is supported by any substantial or legal evidence. In the context of common-law writ of certiorari proceedings, substantial evidence means legal evidence. Eagle Motor Lines, Inc. v. Alabama Public Service Commission, 343 So.2d 767 (Ala.1977). Thus, there must be some evidence presented to the lower tribunal which is competent and legal under the general rules of evidence. Eagle Motor Lines v. Alabama Public Service Commission, supra. Questions of fact or weight or sufficiency of the evidence will not be reviewed on certiorari. Lovelady v. Lovelady, 281 Ala. 642, 206 So.2d 886 (1968). In Alabama Electric Cooperative v. Alabama Power Co., 278 Ala. 123, 176 So.2d 483 (1965), the supreme court stated:
"The supervisory jurisdiction of the court on certiorari is restricted to an examination into the external validity of the proceeding had in the lower tribunal. It cannot be exercised to review the judgment as to its intrinsic correctness, either on the law or on the facts of the case.... [W]hen the court examines the evidence, it does so, not to determine the probabilities preponderate one way or the other, but merely to determine whether the evidence will justify the finding as a legitimate inference from the facts proved regardless of whether such inference would or would not have been drawn by the appellate tribunal." (citations omitted)
The appropriate inquiry then, on a common-law writ of certiorari review, is whether any legal evidence exists to support the lower tribunal's ruling. The facts pertinent to this review are as follows:
A citizen's complaint was filed by Robert Carver against Vaughn in 1982 containing allegations of use of excessive force by Vaughn against Carver and of various violations by Vaughn of department rules and regulations. The department investigated the complaint and found that it was "not sustained." Shortly thereafter, Bailey sent a memorandum to Major Orange reassigning Vaughn to jail duty. The memorandum is as follows:
"It is my [Bailey's] judgment that Deputy James E. Vaughn should be reassigned to the Corrections Division at your earliest convenience. This judgment is based upon a recent personnel complaint lodged against Deputy Vaughn by Robert Brian Carver. An investigation into this complaint was made by Internal Affairs with the conclusion of not sustained regarding Mr. Carver's allegations.
"However, based upon Deputy Vaughn's past history of similar incidents, it has been recommended by Internal Affairs that reassignment be made. I feel this is necessary to protect myself, the department and Jefferson County from the risk of liability that I feel we could well be confronted with regarding some future incident."
The grievance committee noted that Bailey had warned Vaughn in 1980 that any further incidents concerning use of excessive force and violations of department rules would result in more severe disciplinary action. Captain Lawley, department employee, stated in the hearing before the grievance committee that whether transfers were used for disciplinary reasons was often a matter of interpretation. The committee thus found that:
"In that Sheriff Bailey draws a linkage in the nature of the Carver incident and *869 prior incidents and had warned Deputy Vaughn in 1980 that further violations of this nature would result in more severe disciplinary action, the Committee is compelled to view the Sheriff's action of transferring Deputy Vaughn subsequent to the Carver incident as a disciplinary action."
Thus, the committee concluded that Vaughn had been disciplined for an unsustained complaint. The committee considered this discipline unwarranted and ordered that Vaughn be reinstated to patrol duty.
The circuit court found that the committee's decision was erroneous in that it was not supported by substantial evidence. The court stated that the committee's findings were against the preponderance of the evidence and, therefore, reasoned that the committee's decision was arbitrary and capricious. The court further refused to accept the committee's conclusion that Vaughn was transferred for disciplinary reasons.
Given the above rendition of facts, we find that there was some evidence from which the committee could properly infer that Vaughn had been transferred improperly for disciplinary reasons. The circuit court is not permitted to weigh the probabilities and inferences, as it did in this case. It is limited to ascertaining whether there is any legal evidence in the record supportive of the committee's decision. City of Birmingham v. Personnel Board, supra. This portion of the circuit court's judgment reversing the committee's decision reinstating Vaughn to patrol duty is therefore reversed.
We further consider without merit Bailey's contention in his amended complaint that the grievance committee was without jurisdiction to render a decision in this case because it failed to make a finding that Vaughn's transfer was for arbitrary, capricious, or discriminatory reasons, having conclusively addressed the question of the committee's jurisdiction earlier in this opinion. Moreover, we note that the committee has not consistently entered such findings in previous cases before exercising its jurisdiction.
We affirm that portion of the court's judgment finding Vaughn's complaint a grievance under rule 8.6. We reverse that portion of the court's judgment reversing the committee's decision, and render a judgment affirming the grievance committee's decision.
AFFIRMED IN PART, REVERSED IN PART, AND RENDERED.
WRIGHT, P.J., and HOLMES, J., concur.
