On 22 July 1991, respondent North Carolina Code Officials Qualification Board (respondent Board) received a verified written complaint from Mr. Gordon L. Stagaard, owner and occupant of a home located at 400 Oakridge Drive in Edenton, North Carolina. In the complaint, Mr. Stagaard alleged inter alia that petitioner John N. Bunch, Jr. had been guilty of gross negligence or gross incompetence in the inspection of his home. On 12 August 1992, respondent Board issued petitioner a Notice of Administrative Hearing. The purpose of the hearing was to hear testimony concerning the allegations brought against petitioner by Mr. Stagaard and to determine whether petitioner should be permitted to continue to hold inspection certificates pursuant to North Carolina General Statutes § 143-151.17 (1993).
On 20 October 1992, the charges against petitioner came on for hearing before respondent Board. On 16 November 1992, respondent Board issued an order which included the following findings of fact:
*2945. Pursuant to a complaint by Stagaard to the Board, an on-site investigation was performed by a certified Code Enforcement Official of the Engineering Division of the North Carolina Department of Insurance. This investigation confirmed the following violations of the NC Uniform Residential Building Code (hereinafter “Code”) in the house:
a. Wood framing was too close to chimney masonry.
b. Firestopping was omitted above the wood storage area.
c. Insulation was omitted above the wood storage area.
d. The skylight shaft was not insulated.
e. An attic area had no access.
f. Two hearth extensions were too small.
g. Load bearing wall of porch was improperly supported.
h. Omission of hangers or ledgers from deck joists.
i. Inadequate wall support at foundation wall vent.
j. Girder joint was not supported by pier.
k. Girder not supported fully by pier.
l. Improper footing beneath exterior wall.
m. No cover on some electrical junction boxes.
n. No connector at junction boxes at ceiling lights.
o. No electrical receptacle in bathroom.
p. Improper support for electrical wiring.
q. Bathroom exhaust fans not ducted to outside.
r. Improper support for flex duct.
s. No water line shut off valve.
6. Of the foregoing items c, d, e, f, h,j, k, m, n, o, p, r, and s were obvious violations of the Code which were plainly visible and should have been discovered by an inspection if ordinary care and prudence had been exercised.
7. The remainder of the foregoing items a, b, g, i, 1, and q were less obvious or more technical violations of the Code and could have *295been discovered by an inspection if ordinary care and prudence had been exercised.
8. [Petitioner], in his capacity as Code Enforcement Official, made the field inspections as required by law on the Stagaard house.
9. The detection of Code violations in the construction of a house is the responsibility of the field inspector.
10. The failure to detect Code violations while conducting a field inspection amounts to a negligent act.
11. A Code Enforcement Official, pursuant to NCGS 153A-352, has the duty and responsibility to enforce the State and local laws relating to the construction of buildings and other structures.
12. A Code Enforcement Official, pursuant to NCGS 153A-360, shall make as many inspections as necessary to satisfy himself that the work is being done in accordance with State and local laws and the terms of the permit.
13. The Board has the power, pursuant to NCGS 143-151.17, to suspend or revoke any certificate of any person who has been guilty of willful misconduct, gross negligence, or gross incompetence.
Respondent Board then concluded that “[t]he failure of [petitioner] to detect the Code violations ... in the construction of the Stagaard house violated NCGS 153A-352 and 153A-360 and constitutes gross negligence and gross incompetence. . . . Gross negligence or gross incompetence is grounds to revoke the certificates of a Code Enforcement Official. NCGS 143-151.17(a)(6)[.]” Respondent Board ordered the revocation of all inspection certificates issued to petitioner; these included building, electrical, mechanical and plumbing certificates.
Petitioner filed a petition requesting judicial review of respondent Board’s order. The parties entered into a consent order for stay, staying the revocation order pending judicial review.
On 11 October 1993, petitioner’s petition for judicial review came on for hearing. On 4 April 1994, Judge Thomas S. Watts entered his decision reversing the revocation order of respondent Board. Among Judge Watts’ findings were the following:
*296The possession and maintenance by the Petitioner of all Building, Electrical, Mechanical and Plumbing Inspection Certificates previously issued to the Petitioner by [respondent Board] is a substantial right.
This Court has applied the “whole record” test in making its determination under N. C. Gen. Stat. § 150B-51(b)(5). . . . Having applied the “whole record” test to these proceedings . . . this Court concludes as a matter of law that [respondent Board’s] findings, inferences, conclusions and decision as contained in its November 16, 1992 order . . . are unsupported by substantial evidence in view of the entire record as submitted.
By further application of the “whole record” test this Court has also concluded that [respondent Board’s] decision must be reversed because [respondent Board’s] findings, inferences, conclusions and decision are arbitrary and capricious [N.C. Gen. Stat. § 150B-51(b)(6)]. In this regard this Court finds the following to be particularly arbitrary and capricious:
(1) [Respondent Board’s] imperical [sic] finding that a failure to detect any code violation, no matter how “minor”, “technical” or “easily missed” constitutes a negligent act;
(2) [Respondent Board’s] decision to revoke Petitioner’s Mechanical Inspection Certificate based on only two code violations, one of which was, at worst, a minor technical code violation and the other of which involved the Petitioner’s good faith belief that the use of insulated copper wiring to support flex duct constituted a suitable alternative to the code requirement of a one inch metal strip; and
(3) [Respondent Board’s] decision to revoke Petitioner’s Plumbing Inspection Certificate based on Petitioner’s failure to detect one violation of the plumbing code.
Respondent Board gave timely notice of appeal to our Court.
Respondent Board argues on appeal that the trial court erred in concluding that respondent Board’s decision was unsupported by substantial evidence in view of the entire record as submitted. Further, respondent Board argues that the trial court erred in concluding that respondent Board’s decision was arbitrary and capricious.
*297North Carolina General Statutes § 150B-51(b) states the standard of review for this Court when reviewing a decision of respondent Board:
[T]he court reviewing a final decision may affirm the decision of the agency or remand the case for further proceedings. It may also reverse or modify the agency’s decision if the substantial rights of the petitioners may have been prejudiced because the agency’s findings, inferences, conclusions, or decisions are:
(1) In violation of constitutional provisions;
(2) In excess of the statutory authority or jurisdiction of the agency;
(3) Made upon unlawful procedure;
(4) Affected by other error of law;
(5) Unsupported by substantial evidence ... in view of the entire record as submitted; or
(6) Arbitrary or capricious.
North Carolina General Statutes § 150B-51(b) (1991). If the issue on appeal is whether the agency decision was supported by the evidence, or was arbitrary or capricious, our Court employs the “whole record” test. See Air-A-Plane v. N.C. Dept. of E.H.N.R., 118 N.C. App. 118, 454 S.E.2d 295 (1995) and cases cited therein. This requires our Court to examine all of the competent evidence in determining whether there is substantial evidence to support respondent Board’s findings and conclusions. Id. “The ‘whole record’ test does not allow the reviewing court to replace the Board’s judgment as between two reasonably conflicting views, even though the court could justifiably have reached a different, result had the matter been before it de novo{.]” Thompson v. Board of Education, 292 N.C. 406, 410, 233 S.E.2d 538, 541 (1977).
We have conducted a review of all of the evidence and we find there is substantial evidence in the record to support respondent Board’s findings and conclusions as to the revocation of petitioner’s building and electrical certificates. We so find based on respondent Board’s findings of several different violations of the N.C. Uniform Residential Building Code; that many of these violations were plainly visible and should have been discovered by an inspection performed with ordinary care and prudence; and that many of the remaining vio*298lations were less obvious or more technical violations which could have been discovered by an inspection performed with ordinary care and prudence. We are further persuaded to so find based on the evidence presented in the form of inspection reports prepared by both Mr. Michael O’Connor, a private inspector, and Mr. Robert Worley and Mr. Mike Page, staff with the N.C. Department of Insurance, Engineering Division. We also find persuasive the testimony at trial by petitioner himself, admitting many of the violations.
However, we do not believe that there is substantial evidence in the record to support respondent Board’s findings and conclusions as to the revocation of petitioner’s mechanical and plumbing certificates. A review of the evidence indicates minimal mechanical and plumbing violations; of these violations, a majority were considered “minor” or “technical” by the staff investigating the violations, or were not considered violations by the staff. In at least one additional instance, opinions varied as to the violation.
Therefore, we find that the trial court erred in concluding that respondent Board’s decision was unsupported by substantial evidence in view of the entire record as submitted, and erred in concluding that respondent Board’s decision was arbitrary and capricious, as to petitioner’s building and electrical certificates. We find, pursuant to North Carolina General Statutes § 143-151.17(a)(6), that respondent Board properly revoked petitioner’s certificates as to petitioner’s building and electrical certificates. However, we find the trial court properly concluded that respondent Board’s decision was unsupported by substantial evidence in view of the entire record as submitted, and that respondent Board’s decision was arbitrary and capricious, as to the revocation of petitioner’s mechanical and plumbing certificates.
Reversed in part, affirmed in part.
Judges COZORT and McGEE concur.