
251 N.W.2d 214 (1977)
STATE of Iowa, Appellant,
v.
Dwight HERKLEMAN, Appellee.
Nos. 58621, 58627 and 58628.
Supreme Court of Iowa.
March 16, 1977.
Richard C. Turner, Atty. Gen., William F. Raisch and John D. Hudson, Asst. Attys. Gen., and John W. Criswell, County Atty., for appellant.
Stephen A. Hall, of Hall, Ewalt & Hall, Indianola, for appellee.
Heard by MOORE, C. J., and REES, REYNOLDSON, HARRIS and McCORMICK, JJ.
MOORE, Chief Justice.
State appeals trial court's dismissal of three county attorney informations. It contends trial court erred in sustaining defendant's "motion to quash" on the grounds that a prior dismissal of identical charges which was not pursued on appeal to this court operated as a bar to further prosecution. We affirm.
Defendant Herkleman, formerly water commissioner for the town of Carlisle, was charged with four separate indictable misdemeanors for accepting gratuities in violation of Code section 741.1. Trial court sustained defendant's "motion to quash" and demurrer on the basis the statute was violative of equal protection under both the United States and Iowa Constitutions. The State appealed this ruling as to only one of the informations.
During pendency of the appeal, this court ruled in State v. Books, Iowa, 225 N.W.2d 322, that the portion of section 741.1 which had been challenged by Herkleman was constitutional against equal protection challenge. Thereafter the State dismissed its appeal and filed three new identical informations against defendant (the fourth *215 charge was barred by the statute of limitations). Herkleman again filed a "motion to quash" alleging, inter alia, that the charges were barred by the doctrine of res judicata and the filing of new charges violated his Sixth Amendment right to speedy trial.
Trial court sustained defendant's motion on the sole basis that the prior unappealed ruling was determinative of the constitutionality issue between these parties since State v. Books did not automatically render that ruling incorrect. The State appealed separately from dismissal of the three informations and we consolidated them prior to submission.
I. Prefatorily we reject the State's argument that defendant may not raise his res judicata claim in a motion to quash. We have previously held in State v. White, Iowa, 234 N.W.2d 146, 147, under similar circumstances that we treat a "motion to quash" as a demurrer and consider the merits of defendant's contention. State's argument to the contrary is without merit.
II. The State's major contention is that the prior order sustaining defendant's "motion to quash" which dismissed the informations was not res judicata and thus did not bar instituting the second set of charges. Had the State pursued its previous appeal from the order dismissing the informations, there is no question that as to the one dismissal appealed from, Books would apply and mandate reversal for further proceedings. See State v. White, Iowa, 234 N.W.2d at 147-148.
However, because the State dismissed its appeal prior to consideration by this court, it is bound by the previous adverse, albeit erroneous, lower court order. Our holding is consistent with the general rule which has been stated as follows:
"Where a valid judgment has been rendered by a court having jurisdiction of the parties and the subject matter, and it has not been set aside or corrected on appeal or in some other timely and appropriate proceeding, its conclusiveness is not impaired by the fact that it is irregular or erroneous." 50 C.J.S. Judgments § 704 at 159.
Other courts have relied on this rule and applied it to bar prosecution of second actions. Oregon has recently concluded that where an indictment is dismissed, a failure to timely appeal that order renders the matter res judicata between the parties and bars a second identical indictment. State v. Brownlee, 13 Or.App. 480, 510 P.2d 1340; State v. Stahley, 12 Or.App. 579, 507 P.2d 1159. Oklahoma has adopted this position by statute. Rowell v. Smith, Okl.Cr., 534 P.2d 689. We note the Nebraska supreme court has discussed this principle and ruled that even where a lower court judgment was based on an unconstitutional statute, if no appeal is taken, that judgment is binding on the parties and not subject to collateral attack. Norlanco, Inc. v. County of Madison, 186 Neb. 100, 181 N.W.2d 119, 123-124. We have, in effect, the reverse of that situation in the present case.
While we acknowledge some jurisdictions have taken the position that nothing short of an actual trial followed by acquittal has preclusive effect for the defendant, we believe the better view requires the State to appeal final judgments or else be forever barred from further prosecution for the identical offense. Of course, trial court's ruling sustaining a "motion to quash" an information was a final judgment and thus appealable as such to this court. State v. Social Hygiene, Inc., 261 Iowa 914, 922-23, 156 N.W.2d 288, 293.
We agree with trial court that "the State leaped to a delusion" in thinking Books determined its appeal.
AFFIRMED.
