
697 N.W.2d 362 (2005)
2005 ND 103
CITY OF GRAND FORKS, Plaintiff and Appellee,
v.
Timothy C. LAMB, Defendant and Appellant.
No. 20040196.
Supreme Court of North Dakota.
June 2, 2005.
Rehearing Denied June 22, 2005.
*363 Gary E. Euren, City Prosecutor, Grand Forks, N.D., for plaintiff and appellee.
Timothy C. Lamb, pro se, Grand Forks, N.D., defendant and appellant.
VANDE WALLE, Chief Justice.
[¶ 1] Timothy Lamb appealed from a judgment of conviction finding him in violation of a city ordinance requiring an owner of rental property to have a Certificate of Occupancy issued by the City. We affirm.

I
[¶ 2] In 1997, Lamb purchased a residential lot in Grand Forks. He subsequently moved a house onto the lot, with the intent to use it as a rental property. The Grand Forks Building Inspections Department conducted inspections of the building and noted numerous items to be corrected. Ultimately, Lamb made the required repairs and alterations except for a non-complying stairway. Lamb eventually obtained a variance for the non-complying stairway.
[¶ 3] Although at that point the previously discovered Building Code violations had been resolved, Lamb did not apply for a Certificate of Occupancy. The City sent several letters to Lamb, the last dated October 20, 2003, notifying him that the building needed to be reinspected and that he needed a Certificate of Occupancy to rent the property. In February 2004, when Lamb still had not contacted the City to schedule a reinspection or request a Certificate of Occupancy, the City issued a summons and complaint charging him with violating the ordinance requiring a Certificate of Occupancy.
[¶ 4] After a trial in municipal court, the court found Lamb guilty and imposed a fine. Lamb appealed to the district court, which, after a trial de novo, also *364 found Lamb guilty of violating the ordinance and fined him the same amount as the municipal court had imposed.

II
[¶ 5] Before we consider the merits of an appeal, we must have jurisdiction. Choice Fin. Group v. Schellpfeffer, 2005 ND 90, ¶ 6. The right of appeal in a criminal case is statutory and is a jurisdictional matter which we will consider sua sponte. State v. Steen, 2003 ND 116, ¶ 5, 665 N.W.2d 688; State v. Gwyther, 1999 ND 15, ¶ 17, 589 N.W.2d 575. If there is no right to appeal we are without jurisdiction to consider the merits and must dismiss the appeal. Gwyther, at ¶ 17, 589 N.W.2d 575; State v. Owens, 1997 ND 212, ¶ 6, 570 N.W.2d 217.

A
[¶ 6] The City contends there is no appeal to this Court from a district court order affirming a municipal court conviction for violation of an infraction under a city ordinance.
[¶ 7] The City has misconstrued the nature of the district court's review of the municipal court conviction. When a defendant appeals to the district court from a conviction in municipal court, the action is transferred to the district court for trial anew. N.D.C.C. § 40-18-19; N.D.R.Crim.P. 37(j). The district court does not review the record and decision of the municipal court, but holds an entirely new trial and independently determines whether the defendant has violated the ordinance. See City of Bismarck v. Uhden, 513 N.W.2d 373, 380 (N.D.1994) (although the appeal procedure under N.D.C.C. § 40-18-19 is "cumbersome and duplicative," appeals must be for trial anew because municipal courts are not courts of record). If the district court finds a violation it enters a judgment of conviction, which is appealable to this Court under N.D.C.C. § 29-28-06.
[¶ 8] The City argues that we should extend by analogy the law relating to appeals in cases involving noncriminal traffic violations, and deny an appeal from the district court. The City cites N.D.C.C. § 39-06.1-03(5)(a), which allows appeals of traffic violations to district court, but expressly provides "there may be no further appeal." The City also relies upon State v. Walch, 499 N.W.2d 602, 603 (N.D.1993), in which this Court construed N.D.C.C. § 39-06.1-03(5)(a) and held that it had no jurisdiction in an appeal from a county court judgment of conviction for speeding.
[¶ 9] In Bland v. Commission on Med. Competency, 557 N.W.2d 379, 384 (N.D.1996), this Court construed Walch and held that a prohibition on appeals to this Court will not be inferred unless the statute expressly states that appellate jurisdiction is conferred upon the district court and expressly prohibits any further appeal. The Court concluded that the statute at issue in that case did not prohibit an appeal to this Court, noting that, "[w]hen the legislature wants to prohibit appeals to this Court, the legislature will expressly include that language in the statute." Bland, at 384. The City has not directed our attention to any statutory provision which prohibits appeals to this Court from a district court conviction for violation of a city ordinance, and this Court therefore has jurisdiction of such appeals.

B
[¶ 10] Although not raised by the parties, we note an additional potential jurisdictional problem arising from the procedure employed in the district court.
[¶ 11] The trial in district court was held on May 25, 2004. At the conclusion of the trial the court ruled orally from *365 the bench, finding Lamb guilty of violating the ordinance and imposing a fine. The court then advised Lamb that if he intended to appeal to the Supreme Court he would have to file a notice of appeal within thirty days. When the court thereafter failed to issue a written judgment or order, Lamb on June 25, 2004, filed a notice of appeal from "the district court's judgment of May 25, 2004." On September 2, 2004, the court entered a written decision consistent with its prior oral ruling.
[¶ 12] Although the September 2 written decision is captioned "Order Affirming Municipal Court Decision," it is actually a judgment of conviction. The district court did not merely review the record and decision of the municipal court, but, in accordance with N.D.C.C. § 40-18-19 and N.D.R.Crim.P. 37(c), held a full-blown trial anew. See Uhden, 513 N.W.2d at 380. The court then expressly found that Lamb had violated the ordinance and imposed a fine. The September 2 decision is therefore a judgment of conviction, which is appealable under N.D.C.C. § 29-28-06.
[¶ 13] Lamb's June 25, 2004, attempt to appeal from the judgment of the district court was premature. This Court has previously held that when a party attempts to appeal before a final written judgment or order has been entered, we will treat the appeal as being from the subsequently entered consistent judgment. See, e.g., State v. Keilen, 2002 ND 133, ¶ 8, 649 N.W.2d 224; State v. Ritter, 472 N.W.2d 444, 447 (N.D.1991). This rule applies to an attempted appeal from an oral ruling of the trial court. See, e.g., State v. Gwyther, 1999 ND 15, ¶ 20, 589 N.W.2d 575; Ritter, at 447; State v. Hogie, 424 N.W.2d 630, 631 (N.D.1988). Furthermore, N.D.R.Crim.P. 37(c) specifically provides that "[a] notice of appeal filed after the municipal court announces a decision, sentence, or order, but before the entry of the judgment or order, is treated as filed on the date of and after the entry." We therefore treat Lamb's appeal as an appeal from the subsequently entered consistent judgment of conviction, and the appeal is properly before us.

III.
[¶ 14] Lamb contends the district court misapplied the law in finding he had violated the municipal ordinance.
[¶ 15] Section 19-0116 of the Grand Forks City Code ("G.F.C.C.") provides that no dwelling house, apartment, or other similar premises may be occupied by a renter unless a Certificate of Occupancy has been issued by the City Building Inspector. A property owner desiring to rent premises "for living purposes shall make application for a certificate of occupancy to the building inspector upon forms furnished by the city." G.F.C.C. § 19-0117. Section 19-0118, G.F.C.C., delineates the procedure for obtaining a Certificate of Occupancy:
Upon the filing of such application the building inspector, subject to the approval of the health officer, shall issue a certificate of occupancy to such owner or lessee or agent thereof stating that the premises in question are fit for occupancy, if after inspection it is found that such premises complies with the provisions of the public health laws of the State of North Dakota, with the rules and regulations of the state department of health, with the rules and regulations of the city board of health and all other requirements of laws or ordinances pertaining to sanitation and safety.
[¶ 16] In this case, Lamb never submitted an application for a Certificate of Occupancy, but the City conducted a series of inspections after Lamb moved the house onto the lot in 1997. These inspections revealed numerous problems that Lamb *366 was required to correct. An inspection in February 2000 showed that Lamb had corrected all of the previously discovered violations except one, a non-complying stairway. Rather than bring the stairway into compliance with the Building Code, Lamb sought a variance, which was granted in November 2000.
[¶ 17] Lamb did not thereafter apply for a Certificate of Occupancy or request reinspection of the premises. The City sent Lamb a series of letters indicating a reinspection was necessary, but Lamb did not respond. Finally, on October 20, 2003, the City sent a "Final Notice Letter" to Lamb stating that there was no Certificate of Occupancy for the property and that a mandatory inspection of the property was required. The letter also warned that failure to reply would result in a citation for violation of the ordinance. Lamb did not reply, and in February 2004 the City issued a summons and complaint charging Lamb with violating the ordinance.
[¶ 18] Lamb contends that once he received the variance for the stairway in November 2000, all of the prior violations were resolved and the Building Inspector should have automatically issued a Certificate of Occupancy. Lamb's argument ignores the plain language of the ordinance, which requires an application by the property owner on forms supplied by the City and an inspection to verify compliance with all applicable laws, regulations, and codes. Lamb's contention that he believed he had done all he was required to do is belied by the series of letters the City sent to Lamb which, at least by October 2003, clearly and unambiguously advised him a reinspection and issuance of a Certificate of Occupancy was necessary.
[¶ 19] The language of the ordinance indicates the proper chronology for issuance of a Certificate of Occupancy is that the owner files an application, the property is inspected, and the Building Inspector then issues the Certificate if the property complies with all laws, rules, and regulations relating to public health, sanitation, and safety: "Upon the filing of such application the building inspector ... shall issue a certificate of occupancy ... if after inspection it is found that such premises complies with" all laws, rules, and regulations. G.F.C.C. § 19-0118. The City housing inspector who inspected Lamb's property testified that the reason a reinspection is required is to verify that all listed problems have been corrected and to make certain that no new violations have occurred since the prior inspection. In a case such as this, where the prior inspection occurred nine months before the variance was granted, it is certainly a reasonable interpretation of the ordinance to require a reinspection before issuing the Certificate of Occupancy. The City is not required to accept a piecemeal method of approval such as Lamb would have us impose here.
[¶ 20] We conclude the district court did not misapply the law in finding that Lamb had violated the ordinance.

IV
[¶ 21] Lamb claims that the ordinance setting the penalty for violating the City Building Code, including the Certificate of Occupancy provisions, is arbitrary and unreasonable.
[¶ 22] Municipal ordinances are presumed to be valid:
Once it is determined that a city has the general authority to regulate a certain subject matter, the burden is upon the party challenging an ordinance to demonstrate how that authority was exceeded. The ordinance is presumed valid, and a court will not declare the ordinance *367 invalid unless it is "clearly arbitrary, unreasonable and without relation to public health, safety, morals or public welfare."
A & H Services, Inc. v. City of Wahpeton, 514 N.W.2d 855, 857 (N.D.1994) (citation omitted) (quoting Meyer v. City of Dickinson, 451 N.W.2d 113, 116 (N.D.1990)). Municipal authorities have broad discretion in enacting ordinances:
When a municipality has general authority to regulate a particular subject matter, the manner and means of exercising those powers, where not specifically prescribed by the legislature, are left to the discretion of the municipal authorities. Leaving the manner of exercising municipal powers to the discretion of municipal authorities "implies a range of reasonableness within which a municipality's exercise of discretion will not be interfered with or upset by the judiciary."
Ennis v. City of Ray, 595 N.W.2d 305, 308 (N.D.1999) (citations omitted) (quoting Meyer, at 116).
[¶ 23] Section 19-0121, G.F.C.C., provides:
Any person, firm or corporation violating any of the terms or provisions of this article shall be subject to a penalty not to exceed five hundred dollars ($500.00). Each day that a violation is permitted to exist shall constitute a separate offense.
Lamb contends that a $500 fine is clearly arbitrary and unreasonable because the City Building Code is required to be derived from the State Building Code, which does not include a similar penalty. See N.D.C.C. § 54-21.3-03(5). Lamb also suggests that the building codes of other cities in North Dakota either authorize a lower maximum penalty or carry no penalty at all.
[¶ 24] The statute cited by Lamb, while requiring a city which adopts a building code to "adopt and enforce" the State Building Code, specifically authorizes the city to amend the Building Code "to conform to local needs." N.D.C.C. § 54-21.3-03(5). Moreover, we read the requirement to "adopt and enforce" the State Building Code to mean that the City must adopt the State Code as the basic building code, as amended for local needs, and enforce it, not adopt it and neglect to enforce it. The statute neither provides nor limits the method of enforcement, and does not preclude the City from adopting penalties. Furthermore, the fact that other cities authorize lower or no penalties for building code violations does not render this penalty provision arbitrary and unreasonable if there is statutory authority for it.
[¶ 25] It is undisputed that the City has general authority to regulate public health, sanitation, and safety through enactment of a building code. Section 40-05-06(1), N.D.C.C., authorizes a fine of up to $1,000 and imprisonment for up to thirty days for violation of any city ordinance, resolution, or regulation. The City has broad discretion to enact ordinances regulating public health, sanitation, and safety, and G.F.C.C. § 19-0121 falls within the "range of reasonableness" accorded the City. See Ennis, 595 N.W.2d at 308. We conclude that Lamb failed to carry the burden of demonstrating the City exceeded its authority by adopting the penalty provision in G.F.C.C. § 19-0121. See A & H Services, 514 N.W.2d at 857.

V
[¶ 26] We have considered the remaining issues and arguments raised by the parties and find them to be either without merit or unnecessary to our decision. The judgment of conviction is affirmed.
[¶ 27] CAROL RONNING KAPSNER, MARY MUEHLEN MARING, and DALE V. SANDSTROM, JJ., concur.
*368 [¶ 28] The Honorable WILLIAM A. NEUMANN, a member of the Court when this case was heard, resigned effective March 14, 2005, and did not participate in this decision.
