
157 P.3d 355 (2007)
2007 UT App 74
PLEASANT GROVE CITY, Plaintiff and Appellee,
v.
Victor R. ORVIS, Defendant and Appellant.
No. 20050343-CA.
Court of Appeals of Utah.
March 1, 2007.
*357 Peggy A. Tomsic and Kristopher S. Kaufman, Tomsic & Peck LLC, Salt Lake City, for Appellant.
Peter Stirba and Meb W. Anderson, Stirba & Associates, Salt Lake City, for Appellee.
Before GREENWOOD, Associate P.J., ORME and THORNE, JJ.

OPINION
THORNE, Judge:
¶ 1 Defendant Victor R. Orvis appeals the district court's order denying his motion to dismiss. We dismiss the appeal for lack of jurisdiction.

BACKGROUND
¶ 2 Pleasant Grove City (the City) cited Orvis for several counts of operating a business without a license, class B misdemeanors, in violation of a Pleasant Grove City ordinance. Orvis was convicted of the charged offenses in justice court and appealed his convictions to the district court. In the district court, Orvis filed a motion to dismiss the charges, asserting that the City had selectively enforced the ordinance against him in violation of the Fourteenth Amendment of the United States Constitution and Article I, Section 24 of the Utah Constitution. See U.S. Const. amend. XIV, § 1; Utah Const. art. I, § 24. An evidentiary hearing was held on Orvis's motion to dismiss.[1] The district court denied the motion to dismiss and later found Orvis guilty of several counts of operating a business without a license. Orvis filed this appeal.

ISSUE AND STANDARD OF REVIEW
¶ 3 Orvis appeals the district court's order denying his motion to dismiss. "`A trial court's ruling on a motion to dismiss is a question of law.'" State v. Mower, 2005 UT App 438, ¶ 6, 124 P.3d 265 (quoting State v. Taylor, 884 P.2d 1293, 1296 (Utah Ct.App. 1994)). "`Therefore, this court reviews the trial court's decision for correctness, with no particular deference to its legal conclusions.'" Id. (quoting Taylor, 884 P.2d at 1296).

ANALYSIS
¶ 4 Orvis raises several issues on appeal pertaining to the district court's order denying his motion to dismiss. However, as a *358 threshold matter, we must first determine whether this court has subject matter jurisdiction to consider the appeal.
¶ 5 Initially, the City filed a motion for summary disposition asserting that this court lacked jurisdiction over the appeal. This court denied the motion, ruling that, pursuant to Utah Code section 78-5-120(7), see Utah Code Ann. § 78-5-120(7) (2002), jurisdiction was proper because Orvis's docketing statement indicated that he sought an appeal of the constitutionality of an ordinance as applied to him. This court concluded that it had limited jurisdiction to resolve the constitutional issue only.
¶ 6 The City now contends that this court lacks jurisdiction based on two grounds: (1) the constitutional issue was not raised in the justice court, and (2) the district court did not rule on the constitutionality of a statute or ordinance.[2] "Objection to the jurisdiction of the court over the subject matter may be urged at any stage of the proceedings. . . ." James v. Galetka, 965 P.2d 567, 570 (Utah Ct.App.1998) (quotations and citation omitted). Therefore, we now address the jurisdictional issues raised by the City.
¶ 7 This court has jurisdiction over criminal appeals originating in justice court when "the district court rules on the constitutionality of a statute or ordinance." Utah Code Ann. § 78-5-120(7). Accordingly, for decisions appealed from justice courts, "absent an issue regarding the constitutionality of a statute or ordinance, the decision of the district court is final and this court has no jurisdiction to hear an appeal thereof." State v. Hinson, 966 P.2d 273, 277-78 (Utah Ct. App.1998).

I. Whether Orvis was Required to Raise his Constitutional Challenge in the Justice Court
¶ 8 The City first argues that this court lacks jurisdiction because the constitutional issue Orvis raises was not raised in the justice court. The City asserts that Utah case law as enunciated in State v. Hinson, 966 P.2d 273 (Utah Ct.App.1998), clearly provides that the constitutional issue raised on appeal must have been raised in the justice court proceeding. See id. at 276-77. However, the legal authority supporting Hinson for this proposition has changed.[3] Since Hinson, rule 26(12)(a) of the Utah Rules of Criminal Procedure has been repealed[4] and Utah Code section 78-5-120 has been amended.[5]

A. Utah Case Law Prior to the Repeal of Rule 26(12)(a) and Amendment of Utah Code Section 75-5-120
¶ 9 Prior to its amendment in 2001, Utah Code section 78-5-120 stated that, "[t]he *359 judgment after trial de novo may not be appealed unless the court rules on the constitutionality of a statute or ordinance." Utah Code Ann. § 78-5-120 (Supp.1997) (amended 2001) (emphasis added). Utah courts applied the statute in conjunction with rule 26(12)(a) of the Utah Rules of Criminal Procedure, which provided, "[t]he decision of the district court is final, except when the validity or constitutionality of a statute or ordinance is raised in the justice court." Utah R.Crim. P. 26(12)(a) (repealed 1999) (emphasis added); see also Hinson, 966 P.2d at 275.
¶ 10 In Hinson, as in prior cases, this court applied the statute and rule as articulated above, and determined that a party was required to attack the constitutionality or validity of a statute or ordinance in the justice court in order to preserve an appealable issue beyond the district court.[6]See 966 P.2d at 277-78.

B. Utah Case Law After Repeal of Rule 26(12)(a) and Amendment of Utah Code Section 75-5-120
¶ 11 Since Hinson, Utah Code section 78-5-120(7) has been amended. As amended, Utah Code section 78-5-120(7) provides that "[t]he decision of the district court is final and may not be appealed unless the district court rules on the constitutionality of a statute or ordinance." Utah Code Ann. § 78-5-120(7) (2002) (emphasis added). Given the repeal of rule 26(12)(a) and the latest amendment of section 78-5-120(7), we interpret subsection (7) as conferring appellate jurisdiction over cases originating in justice court when the district court rules on the constitutionality of a statute, without the further requirement of an appellant raising the issue in the justice court.[7] Both the legislative history of section 78-5-120 and the manner in which the requirement of raising the issue in justice court was implemented further support this interpretation. Justice courts are not courts of record, making it difficult to enforce the requirement that the constitutional challenge be initiated in the justice court. Therefore, Utah courts presumed that "if the challenge was properly and adequately raised in the circuit court [or court of record], then it was also properly raised in the justice of the peace court." City of Monticello v. Christensen, 769 P.2d 853, 854 (Utah Ct.App.1989). Thus, the elimination of the requirement to raise the issue in justice court is of little consequence. Section 78-5-120(7), in effect, divests the need for the presumption by requiring the parties to properly and adequately raise the challenge in the district court. See Utah Code Ann. § 78-5-120(7).
¶ 12 Utah courts have applied the statute in a manner consistent with this interpretation. Cf. West Jordan City v. Goodman, 2006 UT 27, ¶¶ 17-18, 135 P.3d 874 (finding subject matter jurisdiction over case originating in justice court wherein the constitutionality of a convicting court was raised for the first time in the district court); Bernat v. Allphin, 2005 UT 1, ¶¶ 10-42, 106 P.3d 707 (same), cert. denied, 545 U.S. 1104, 125 S.Ct. 2550, 162 L.Ed.2d 276 (2005). But see South Salt Lake City v. Terkelson, 2002 UT App 405, ¶ 6, 61 P.3d 282 (stating that case law provides that neither this court nor the Utah Supreme Court has jurisdiction to hear an appeal from cases originating in justice court "unless the issues raised in the justice court `involve[] the validity or constitutionality of an ordinance or statute'" (alteration in original) (quoting Hinson, 966 P.2d at 276)); Sandy City v. Haertel, 2006 UT App 60 (per curiam) (same), cert. denied, 138 P.3d 589 (Utah 2006). Based on our interpretation and prior application of section 78-5-120(7), we conclude that Orvis's failure to raise the *360 constitutional challenge in the justice court did not divest this court of jurisdiction.

II. Whether the District Court Ruled on the Constitutionality of a Statute or Ordinance
¶ 13 The City next argues that this court lacks jurisdiction because Orvis did not challenge the constitutionality of the business license ordinance, nor did the district court rule on the constitutionality of the ordinance. Conversely, Orvis avers that the district court ruled on the constitutionality of the business license ordinance when it denied his motion to dismiss, as the motion sought to have the criminal charges dismissed on the grounds of selective enforcement in violation of the Fourteenth Amendment to the United States Constitution and Article I, Section 24 of the Utah Constitution.[8] Orvis further asserts that his selective enforcement claim was an "as applied" challenge to the constitutionality of the ordinance and therefore sufficient to vest this court with jurisdiction.
¶ 14 "When asserting an as-applied challenge, the party claims that, under the facts of his particular case, `the statute was applied . . . in an unconstitutional manner.'" State v. Ansari, 2004 UT App 326, ¶ 27, 100 P.3d 231 (omission in original) (quoting State v. Herrera, 1999 UT 64, ¶ 4 n. 2, 993 P.2d 854). "It is the application of the [challenged statutes] to defendants by law enforcement officials we review; in an `as applied' examination, defendants may not generalize beyond the conduct with which they are charged." United States v. LaHue, 261 F.3d 993, 1007 (10th Cir.2001); see also State v. Nieberger, 2006 UT App 5, ¶ 17, 128 P.3d 1223, cert. denied, 138 P.3d 589 (Utah 2006). An as-applied challenge "asks[s] only that the reviewing court declare the challenged statute or regulation unconstitutional on the facts of the particular case." Sanjour v. Environmental Prot. Agency, 56 F.3d 85, 92 n. 10 (D.C.Cir.1995).
¶ 15 We have carefully reviewed the record and the appellate briefs and despite Orvis's characterization of his selective enforcement claim as an as applied challenge, we conclude that Orvis did not challenge the constitutionality of the business license in his motion to dismiss. Rather, Orvis challenged only the constitutionality of the City's decision to selectively enforce the ordinance against him in a discriminatory manner. The issue in selective enforcement and selective prosecution cases is not whether legislation is constitutional as applied to a particular set of facts. Instead, the issue in a selective enforcement case is whether the government may constitutionally apply the same rule to some individuals characterized by that particular set of facts but not to others similarly situated.[9]See id. at 92 n. 9. Similarly, the issue in a selective prosecution case is whether the prosecutor has brought the charge for reasons forbidden by the constitution.[10]See State v. Wallace, 2005 UT App 306.
¶ 16 Although both selective enforcement and selective prosecution claims raise constitutional issues, neither claim attacks the constitutionality or validity of the business license ordinance. See id. (stating that selective prosecution claims are assessed according to ordinary equal protection standards); *361 see also Wayte v. United States, 470 U.S. 598, 608, 105 S.Ct. 1524, 84 L.Ed.2d 547 (1985) ("[S]electivity in the enforcement of criminal laws is . . . subject to constitutional constraints. . . . It is appropriate to judge selective prosecution claims according to ordinary equal protection standards." (first omission in original) (quotations and citation omitted)). Neither the selective enforcement nor selective prosecution claim, on the facts of this case, constitutes an as applied challenge. Likewise, various other courts have also declined to characterize selective enforcement and selective prosecution claims as applied challenges. See, e.g., Sanjour, 56 F.3d at 92 n. 9 ("The critical inquiry in [selective enforcement] cases is thus not whether legislation is constitutional `as applied' to a particular set of facts, but rather whether the government may constitutionally `apply' the same rule to some individuals but not to others similarly situated."); Rindley v. Gallagher, 929 F.2d 1552, 1555 (11th Cir. 1991) (holding that the constitutional issues raised in three of plaintiff's claims pertaining to selective enforcement did not implicate the constitutionality of the statute); King v. State, 174 S.W.3d 796, 815, 820 (Tex.App. 2005) (addressing selective prosecution claim separately from defendant's as applied constitutional challenges).
¶ 17 Furthermore, Orvis's motion to dismiss the charges did not include a request to have the district court review the constitutionality of the ordinance and declare the challenged ordinance unconstitutional or invalid on the facts of the case, as appropriate in an as applied challenge. See Sanjour, 56 F.3d at 92 n. 10. As a result, the district court did not rule on the constitutionality of the business license ordinance. Rather, the district court only addressed the merits of Orvis's motion to dismiss based on the defense of selective prosecution, and determined that Orvis failed to meet the standard required to assert a selective prosecution defense. We conclude that the district court did not rule on the constitutionality of the business license ordinance. Because this appeal is not taken from a district court ruling on the constitutionality of a statute or ordinance, it is not within our appellate jurisdiction. See Utah Code Ann. § 78-5-120(7).

CONCLUSION
¶ 18 Utah Code section 78-5-120(7) confers appellate jurisdiction over cases originating in justice court when the district court rules on the constitutionality of a statute without the further requirement of raising the issue in justice court. However, Orvis did not challenge the constitutionality of the business license ordinance in his motion to dismiss before the district court, but rather the selective enforcement of the ordinance. Moreover, the constitutional issues raised in either a selective enforcement or a selective prosecution defense do not attack the constitutionality of the ordinance as such. Therefore, Orvis failed to raise an as applied challenge to the ordinance so as to vest this court with jurisdiction.
¶ 19 Finally, the district court did not consider or rule on the constitutionality of the business license ordinance. Instead, the district court ruled only that Orvis failed to meet the elements of selective prosecution. Because the district court did not rule on the constitutionality of the ordinance, we conclude that this court lacks jurisdiction. Once a court has determined that it lacks jurisdiction, it "retains only the authority to dismiss the action." Varian-Eimac, Inc. v. Lamoreaux, 767 P.2d 569, 570 (Utah Ct.App.1989). Accordingly, we dismiss the appeal and do not address the merits of the district court's denial of Defendant's motion to dismiss.
¶ 20 WE CONCUR: PAMELA T. GREENWOOD, Associate Presiding Judge and GREGORY K. ORME, Judge.
NOTES
[1]  Additionally, Orvis filed a motion to suppress, which was also addressed and denied at the evidentiary hearing. Orvis does not, however, appeal the district court's denial of the motion to suppress.
[2]  Orvis asserts in his reply brief that the City's renewed attempt to have this court reconsider its decision on jurisdiction should be rejected because the City failed to file a petition for rehearing. Regardless of whether the City was required to file a petition for rehearing, this court cannot proceed without subject matter jurisdiction. See Thompson v. Jackson, 743 P.2d 1230, 1232 (Utah Ct.App.1987) (per curiam) ("Subject matter jurisdiction is the power and authority of the court to determine a controversy and without which it cannot proceed.").
[3]  Nonetheless, State v. Hinson, 966 P.2d 273 (Utah Ct.App.1998), remains valid and frequently cited for other issues pertaining to trial de novo appeals including the proposition that "absent an issue regarding the constitutionality of a statute or ordinance, the decision of the district court is final and this court has no jurisdiction to hear an appeal thereof." Id. at 277-78; see, e.g., Murray City v. Markosian, 2006 UT App 342 (per curiam); State v. Tomlinson, 2006 UT App 333 (per curiam).
[4]  Rule 26(12)(a) was repealed on April 1, 1999. See Utah R.Crim. P. 26, historical notes. Additionally, the current provisions of the Utah Rules of Criminal Procedure make no mention of any requirement that a challenge be raised in the justice court. Rather, rule 38 provides that "[a]ppeal of a judgment or order of the justice court is as provided in Utah Code section 78-5-120." Utah R.Crim. P. 38(a).
[5]  Utah Code section 78-5-120 was repealed and reenacted in 2001 to "modif[y] provisions providing for appeals from justice court convictions" and to "clarif[y] the circumstances under which a person . . . may appeal." Act of Feb. 22, 2001, ch. 122, § 1, 2001 Utah Laws 620. As a result, the legislature replaced the language in section 78-5-120, from "unless the court rules on the constitutionality," Utah Code Ann. § 78-5-120(7) (Supp.1997) (amended 2001) (emphasis added), to "unless the district court rules on the constitutionality," id. § 78-5-120(7) (2002) (emphasis added).
[6]  In Hinson, we noted that

[a]lthough [r]ule 26(12)(a) requires that a party attack the constitutionality or validity of a statute or ordinance in the justice court to have an appealable issue beyond the district court, the 1997 amendment to section 78-5-120 suggests a party could raise the issue in the district court in the de novo proceedings.
966 P.2d at 275 n. 2.
[7]  "When interpreting a statute, we must generally presume the legislature used each term thoughtfully. We therefore strive to give appropriate meaning to each term. . . . When the words are clear, . . . we will interpret them as written, leaving to the legislature the task of making corrections when warranted." State v. Wallace, 2006 UT 86, ¶ 9, 150 P.3d 540.
[8]  Although Orvis's motion to dismiss raised a selective enforcement defense, the district court dismissed the motion on Orvis's failure to meet the elements of a selective prosecution defense. In so doing, the district court implicitly determined that Orvis's defense was more appropriately one of selective prosecution and not selective enforcement. Orvis asserts that the district court applied the wrong standard by applying the elements pertaining to the defense of selective prosecution rather than selective enforcement. Absent subject matter jurisdiction we may not reach the merits of the issue on appeal. Therefore, we do not determine which defense applies in this case, and analyze both defenses as they pertain to the jurisdictional issue.
[9]  To prove a claim of selective enforcement the defendant must demonstrate, in part, that there is an intentional and deliberate plan on the part of state officials to enforce the law selectively against them. See Herman v. State, 821 P.2d 457, 458 (Utah 1991); see also Village of Willowbrook v. Olech, 528 U.S. 562, 564-65, 120 S.Ct. 1073, 145 L.Ed.2d 1060 (2000) (per curiam).
[10]  To establish a prima facie case of selective prosecution, "the defendant must demonstrate that a prosecutorial policy results in a discriminatory effect, based on an unlawful classification." State v. Geer, 765 P.2d 1, 3 (Utah Ct.App. 1988).
