
    Greely v. McCoy.
    Where a demurrer to a complaint is sustained, and plaintiff, instead of amending, as given leave to do, appeals, the appellate court, in affirming the order, may, unless there has been a judgment rendered, which it also affirms, grant leave to amend. People v. Jackson, 24 Cal. 630, distinguished.
    (Syllabus by the Court.
    Opinion filed March 18, 1893.)
    Appeal from circuit court, Minnehaha county. Hon. F. R. Aikens, Judge.
    Action by Charles A. G-reeley against Charles T. McCoy on a contract of guaranty. A demurrer to the complaint was sustained on appeal, 3 S. D. 218, 52 N. W. Rep. 1050, and plaintiff applied to this court for leave to amend his complaint in the court below.
    Allowed.
    No briefs filed.
    
      Wynn & Node, for the application.
    
      Winsor & Kittredge, contra.
    
   Kellam, J.

This is an application by appellant upon notice to modify the judgment of this court "so as to give leave to the said appellant to amend his complaint in said action” in the court below. The appeal in which the judgment referred to was rendered was from an order of the trial court sustaining a demurrer to the appellant’s complaint, and is reported in 52 N. W. Rep. 1050. The order appealed from not only sustained the demurrer, but allowed appellant to amend his complaint so that the trial court had an opportunity to and did exercise its discretion as to allowing the unsuccessful party to plead over, as provided in section 4937, Comp. Laws; and, by adding a provision to the former judgment rendered by this court that appellant be allowed to amend his complaint in the court below, we do not undertake to control in advance the discretion of the trial court but only express our approval of the manner in which such discretion has already been exercised. In Sewing Mach. Co. v. Moore, 2 Dak. 280, 8 N. W. Rep. 131, and in Adams v. Smith, 6 Dak. 94, 50 N. W. Rep. 720, the territorial supreme court went further than we are asked to go, and in the first instance, on appeal from a decision on demurrer, directed the trial court how its discretion should be exercised as to allowing a party to plead over, after a demurrer to his pleading had been sustained. As opposed to the authority of this court to direct that appellant be allowed to amend in the court below, respondent recites People v. Jackson, 24 Cal. 630, where it is held that where a demurrer to a complaint is sustained in the court below, and, the plaintiff declining to amend, judgment is rendered against him, from which judgment and order sustaining the demurrer he appeals, the appellate court, if it affirm the judgment, cannot grant plaintiff leave to amend his complaint; but this conclusion results from the fact that there a prior judgment was rendered, which was affirmed. To allow plaintiff to amend his complaint would do no good, for there were no longer any issues to be tried. It would be an anomaly in legal proceedings for the appellate court to affirm such prior judgment, and at the same time, with such judgment established against him, direct that the plaintiff might amend his complaint. See Sutter v. San Francisco, 36 Cal. 112, where the reasons for the decision in People v. Jackson are more fully explained. Appellant’s application is allowed, and the judgment of this court is modified by directing that he be allowed to amend his complaint in the court below.  