*38Opinion by
Mr. Justice Eakin.1. The question is whether the order appealed from is a final order, or one from which an appeal will lie at this stage of' the proceeding. Our statute (Section - 547), as amended (Laws 1907, p. 313, c. 162), provides:
“A judgment or decree may be reviewed as prescribed in this chapter, and not otherwise. An order affecting a substantial right, and which in effect determines the action or suit so as to prevent a .judgment or • decree therein, or a final order affecting a substantial right, and made in a proceeding after judgment or decree, or an order setting aside a judgment and granting a new trial, for the purpose of being reviewed, shall be deemed a judgment or decree.”
It is held in State v. Security Sav. Co. 28 Or. 410 (43 Pac. 162) and School District v. Irwin, 34 Or. 431 (56 Pac. 413), that an appeal is statutory and cannot be extended to cases not within the statute, and it has frequently been decided by this court that an appeal will not lie except from a final order affecting a substantial right: State v. O’Day, 41 Or. 495 (69 Pac. 542), and eases cited.
2. Counsel for defendant insists, however, that, the demurrer to the' complaint of' Sears being sustained, the substitution of the State by the amendment is the commencement of a new suit, and that the order was final as to the Sears complaint or suit. No authorities are cited by defendant in 'support of his position. Whether the amendment is one authorized by the statute is not the question, but whether the court lost jurisdiction of the defendant by the substitution. The effect of the amendment is to eliminate Sears because he was not a necessary or proper party, and’it is final as to him; but the defendant is claiming no relief against him, and he is not affected thereby. Granting leave to plaintiff to amend his pleading is within the power of the court, and, even though such power was exercised erroneously, yet The order is not void. The action of the court in sustaining the demurrer to the complaint did not terminate the jurisdiction of the court. Section 101, B. & C. Comp., provides:
*39“If the demurrer be sustained, the court may in its discretion allow the party to amend the pleading demurred to.”
Section 102 provides:
“The court may, at any time before trial, in furtherance of justice, * * allow any pleading * * to be amended by adding the name of a party, or * * by striking out the name of any party.”
While the court has jurisdiction of the case, the order allowing the amendment is one within its jurisdiction, even if erroneous.
3. At the hearing counsel argued this motion upon the merits of the appeal, on the theory that, if the order allowing the substitution was error, then it is appealable; but we may not decide the merits upon this motion. If, in determining the motion to dismiss the appeal, it is necessary to determine the merits as to the substitution, then this motion must be denied. Whether the order was error oi not, it is not appealable, unless, it terminates or disposes of defendant’s rights in the subject of the suit. Many courts have discussed the right to such substitution, usually brought to the appellate court upon the appeal from final judgment, and it was always treated as a matter within the jurisdiction of the court, and not affecting the merits. Such are the following cases: Davis v. Mayor of New York, 14 N. Y. 506 (67 Am. Dec. 186); Dubbers v. Goux, 51 Cal. 153; Vinegar Bend Lum, Co. v. Chicago T. & T. Co. 131 Ala. 411 (30 South. 776), cited by defendant on the merits; Johnson v. Martin, 54 Ala. 271; Campbell & Z. Co. v. Barr Pumping Eng. Co. 182 Mass. 304 (65 N. E. 396); Wells v. Stombock, 59 Iowa, 376 (13 N. W. 339); McCall v. Lee, 120 Ill. 261 (11 N. E. 522); Lake Erie & W. Ry. Co. v. Town of Boswell, 137 Ind. 336 (36 N. E. 1103), and many other cases might be cited. In Chicago, K. & W. Ry. Co. v. Butts, 55 Kan. 660 (41 Pac. 948), it is held that an order of substitution is not a final order, and therefore not appealable. To the same effect are Bossler v. Johns, 2 Pen. & W. (Pa.) 331; Welch v. Allen, 54 Cal. 211; Hall v. Vanier, 7 Neb. 397; Grant v. Los *40Angeles & Pac. Ry. Co. 116 Cal. 71 (47 Pac. 872). In Chicago, K. & W. Ry. Co. v. Butts, 55 Kan. 660 (41 Pac. 948), it is held that the order of substitution was error, but not appealable, and it was reviewed upon the appeal from the final judgment,
If the order of the court was made in a matter beyond its jurisdiction or in relation to a matter of which it had not acquired jurisdiction, then it might be appealable; as to the adverse party to that proceeding it would be final. But, error in an interlocutory order within the jurisdiction is not sufficient to render it void or operate as a final order. Tn Hume v. Bowie, 148 U. S. 245, 252 (13 Sup. Ct. 582, 584: 37 L. Ed. 438), the court had before it a question involving the same principle. In that case a motion was made to vacate a decree rendered at a previous term and to grant a new trial, which motion was allowed by the court below. It was insisted by respondent that the order was not final, and therefore not appealable. Mr. Chief Justice Puller says: “This case comes before us on a motion to dismiss the writ of error for want of jurisdiction, upon the ground that the judgment brought here by the writ is not a final judgment. * * The question involved is one of power, for if the court had power to make the order when it was made, then it was not a final judgment, as it merely vacated the former judgment for the purpose of a new trial upon the merits of the original action. If the court had no jurisdiction over that judgment, the order would be an order in a new proceeding, and in that view final and reviewable.” And in Bronson v. Schulten, 104 U. S. 410 (26 L. Ed. 727) the same identical question arose, in which it was held that, if there was no jurisdiction, then the order was final, otherwise, not. In Philipps v. Negley, 117 U. S. 665, 671 (6 Sup. Ct. 901, 903: 29 L. Ed. 1013), it is held: “If, properly considered, the order in question was an order in the cause which the court had power to make at the term when it was made, the consequence may be admitted that no appellate tribunal has jurisdiction to question its propriety. * * The vacating of a judgment and grant*41ing a néw trial in the exercise of an acknowledged jurisdiction, leaves no judgment in force to be reviewed. If, on the other hand, the order made was made without jurisdiction on the part of the court making it, then it is a proceeding which must be the subject of review by an appellate court.” The same is held in Deering v. Quivey, 26 Or. 556 (38 Pac. 710).
4. Although these cases all relate to motions to vacate judgments, they determine what constitutes a final or appealable order. How can it be said that an order is final when it does not terminate the suit or in any manner end the litigation as to the subject-matter or as to defendant? An order that may be deemed a decree is defined in B. & C. Comp. § 547, as one “which in effect determines the action or suit so as to prevent a judgment or "decree therein”; but no such effect results from this order. Mr. Chief Justice Moore, in Marquam v. Ross, 47 Or. 374, 383 (78 Pac. 698), reviews the Oregon cases as to what are final orders, and construes Section 547, B. & C. Comp., and concludes: “It will be seen that the original adjudication of the right involved within the issues is the judgment or decree from which an appeal lies.” In State v. Security Sav. Co. 28 Or. 410, 417 (43 Pac. 162), it is held that, where the right to the relief sought is determined, it is final and appealable. “An order or decree is final for the purposes of an appeal when it determines the rights of the parties, and no further questions can arise before the court rendering it except such as are necessary to be determined in carrying it into effect.” In Basche v. Pringle, 21 Or. 24 (26 Pac. 863), Mr. Justice Bean says an appealable judgment “is one which concludes the parties as regards the subject-matter in controversy in the tribunal pronouncing it.”
From these authorities it is clear that, if the ruling had the effect to finally terminate defendant’s rights or interest in the subject of the suit, it was final as to him, even though it did not determine the merits of the case, Or if it was made without jurisdiction; that is, in a ease or as to matter not within the power of the court it would be final, even though only an *42interlocutory order. In this case the defendant’s rights are not concluded by the ruling. Neither is the order one made without jurisdiction, and the appeal is premature, and must be dismissed. ' Appeal Dismissed.