This is an appeal from an order overruling a demurrer to the complaint.
This action is brought in Benson county to foreclose two real estate mortgages. The mortgages were executed the same day to secure the same indebtedness, but one covers land locatedentirely within Benson county, and the other covers land locatedentirely within Eddy county. L.B. Garnaas and P.A. Peterson are made defendants on a written *Page 346 instrument, guaranteeing the payment at maturity of the indebtedness, secured by the said mortgage. The defendants are all residents of Eddy county.
The demurrer to the complaint is
"1. That the above named Court has no jurisdiction of the subject of this action.
"2. That several causes of action have been improperly united.
"3. That the complaint herein does not state facts sufficient to constitute a cause of action.
"4. That this action is not brought in the proper county, in so far as the mortgage on the Eddy County land is concerned."
It is the contention of appellants that the court has no jurisdiction of the subject of this action. The question of jurisdiction was raised in the case of Territory ex rel. Travelers' Ins. Co. v. Third Judicial Dist. Judge, 5 Dakota 275, 38 N.W. 439, an action to foreclose a mortgage brought in the wrong county. In that case the court said: "Under Code of Civil Proc. Dak. § 92 (§ 7415, 1925 Supp. Comp. Laws 1913), providing that an action for the foreclosure of a mortgage on real property must be brought in the county wherein the land is, and § 95, which provides that, `if the county designated for that purpose in the complaint be not the proper county, the action may notwithstanding be tried therein, unless the defendant, before the time for answering expire, demand in writing that the trial be had in the proper county,' an action brought in one county and judicial district to foreclose a mortgage on land in another county and district, defendant being in default, is within the jurisdiction of the court to try." The court further said: "We think that the latter section is a qualification of the former, and that the court had jurisdiction; that the statute is merely directory with respect to the place of trial; and that the defendant simply has a personal right to insist upon those actions which are denominated as local, being tried in the county in which the subject-matter is situated, and which right the defendant to the action may waive, and in this case has waived, by his default. The statutes of New York, California, Minnesota, and Wisconsin are very similar, if not precisely similar, to ours." March v. Lowry, 16 How. Pr. 42; *Page 347 Lane v. Burdick, 17 Wis. 93; Gill v. Bradley, 21 Minn. 15; O'Neil v. O'Neil, 54 Cal. 187.
Section 7415, Compiled Laws 1913, provides: "Actions for the following causes must be tried in the county in which the subject of the action or some part thereof is situated, subject to the power of the court to change the place of trial in cases provided by statute: . . . 3. For the foreclosure of a mortgage of real property." If the action is not brought in the proper county the remedy, under § 7418, Compiled Laws 1913, is to demand in writing a change of place of trial within the statutory time for answering the complaint, and not by demurrer. "When a demand in writing is required by the statute it is of course necessary that such a demand be made in order to entitle the moving party to a change." 2 Bancroft, Code Pr. Rem. § 1020, p. 1464; Byrne v. Byrne, 57 Cal. 348; Estrada v. Orena, 54 Cal. 407; McCarty v. Herrick, 41 Idaho, 529, 240 P. 192; State ex rel. Davis v. District Ct. 72 Mont. 56, 231 P. 395; Connolly v. Salsberry,43 Nev. 182, 183 P. 391; Elam v. Griffin, 19 Nev. 442, 14 P. 582; Gotthelf v. Merchants' Bank, 33 S.D. 259, 145 N.W. 542; Barbour v. Fidler, 31 S.D. 351, 141 N.W. 88.
In the case of Pereles v. Albert, 12 Wis. 666 the Wisconsin court said: "If the plaintiff designates in his complaint the wrong county as the place of trial, the defendant's remedy is to demand that the trial be had in the proper county. And when he fails to do so, we think there is no error in the judgment on account of the trial taking place or judgment being rendered in a wrong county. This is the construction placed upon the corresponding provisions of the New York Code by the courts of that State in the following cases: Miller v. Hull, 3 How. Pr. 325; Beardsley v. Dickinson, 4 How. Pr. 81; Chubbuck v. Morrison, 6 How. Pr. 367; Bangs v. Selden, 13 How. Pr. 163; and we see no valid objection to it." This case was followed in the case of Lane v. Burdick, 17 Wis. 93, supra; but the rule was changed in Wisconsin by chapter 243, Laws of 1862. See Beach v. Sumner,20 Wis. 275. The same construction was put upon this statute by Gill v. Bradley, 21 Minn. 15, supra and in the California court in O'Neil v. O'Neil, 54 Cal. 187, supra. In the case of Viets v. Silver, 19 N.D. 445, 126 N.W. 239, this court held, in substance, that an action to *Page 348 foreclose a mortgage brought in the wrong county would upon proper and timely demand be transferred or changed to the proper county. It does not define the meaning of "proper and timely demand" but the statute does this. The statute provides that the demand shall be made in writing before the time for answering expires.
2 Bancroft's Code Pr. Rem. § 1024, p. 1470 states: "In Nevada, North Dakota and South Dakota, the statutes provide that if the county designated for that purpose in the complaint is not the proper county, the action may notwithstanding be tried therein unless the defendant makes a demand for a change before the time for answering expires. Under such a provision the time within which a party must make a demand begins to run from the date of the service of summons. And the consent of the attorneys of the plaintiff to an extension of time for answering does not change the time for a demand for a change of venue." N.D. Comp. Laws 1913, § 7418; Revised Code S.D. 1919, § 2328; Page v. Walser, 43 Nev. 422, 187 P. 509; Connolly v. Salsberry, 43 Nev. 182, 183 P. 391, supra; Irwin v. Taubman, 26 S.D. 450,128 N.W. 617; Price v. Willson, 41 N.D. 209, 171 N.W. 245; Gotthelf v. Merchants' Bank, 33 S.D. 259, 145 N.W. 542, supra.
In the case of McDonald v. Second Nat. Bank, 106 Iowa, 517,76 N.W. 1011, two mortgages were executed by the same parties to secure the same indebtedness, covering land in two different counties. The court said: "But the mere fact that an action is prosecuted in the wrong county does not deprive the court of jurisdiction. This happens when the action is purely in rem, and not in personam as well. Orcutt v. Hanson, 71 Iowa, 514,32 N.W. 482. But if the action is personal, and also pertains to the res, and is brought in the wrong county, the only remedy is that provided by § 3504 of the Code, which is, in part: `If an action is brought in a wrong county, it may there be prosecuted to a termination, unless the defendant, before answer, demands a change of place of trial to the proper county.' Lyon v. Cloud,7 Iowa, 1; Cole v. Conner, 10 Iowa, 299; Goldsmith v. Wilson,67 Iowa, 662, 25 N.W. 870." This is a construction of a statute identical with § 7418, Comp. Laws 1913 and the court held that the right to a trial in the proper county was waived by failure to appear and make demand within the statutory time. The defendants have *Page 349 waived the right by failing to appear within the time for answering and making demand in writing for a change of place of trial and this applies to all the defendants, the guarantors as well as the mortgagors.
The defendants also demur on the ground that several causes of action have been improperly united and it is their contention that uniting the action against the guarantors with the action to foreclose the mortgage is a misjoinder of the causes of action. Section 7466, Comp. Laws 1913, provides: "The plaintiff may unite in the same complaint several causes of action, whether they are such as have been heretofore denominated legal or equitable, or both, where they all arise out of: . . ." Then follow five subdivisions, the first of which only need be considered, namely: causes of actions may be united when they arise out of "the same transaction, or transactions connected with the same subject of action."
It is alleged in the complaint "That in consideration of the extension and renewal of the said indebtedness pursuant to the terms of the note last above mentioned the defendants L.B. Garnaas and P.A. Peterson, they being then and there stockholders and officers of the said Sheyenne Agricultural Credit Corporation, did make, execute and deliver to the plaintiff their guaranty of the payment of said indebtedness, a copy of which guaranty is hereto attached, marked Exhibit `A,' and hereby made a part of this complaint." By their contract of guaranty the said Garnaas and Peterson guaranteed the payment of said mortgage indebtedness at maturity as provided in a note made and executed on the same date for the sum of $12,657.20. This note represented the amount due on the mortgages on the 5th day of June, 1930 and the guaranty was given on the same day. The guarantors are stockholders in the defendant corporation, and the guaranty was given for an extension of time — a renewal of the indebtedness. Clearly the cause of action against the guarantors arises out of the transaction between the plaintiff and the defendant corporation and there is no misjoinder of causes of action. Besides § 8102, Comp. Laws 1913, provides that in an action to foreclose "If the mortgage debt is secured by the obligation, or other evidence of debt, or any other person than the mortgagor, the plaintiff may make such other person a party to the action . . ." and under § 6662, Comp. Laws 1913, "A *Page 350 guarantor of payment or performance is liable to the guarantee immediately upon the default of the principal and without demand or notice."
The order overruling the demurrer must be, and is, affirmed.
BURR, NUESSLE, MORRIS and CHRISTIANSON, JJ., concur.