
28 S.W.3d 191 (2000)
In re Tonya BRIDGES.
No. 2-00-259-CV.
Court of Appeals of Texas, Fort Worth.
September 13, 2000.
Rehearing Overruled October 12, 2000.
*192 Brown, Herman, Dean, Wiseman, Liser & Hart, L.L.P., Stephen L. Tatum, Fort Worth, Jerry Kirksey & Assoc., Jerry Kirksey, Benjamin L. Barnes, Steven R. Booker, Edmond, OK, Bill Camp, Dallas, for Relator.
Oldham & Hanson, Charles Oldham, Wichita Falls, Markle, Ramos & Zito, Spencer G. Markle, Chad M. Forbes, Houston, for Real Parties in Interest.
Panel B: DAY, LIVINGSTON, and GARDNER, JJ.

OPINION
SAM J. DAY, Justice.
Relator seeks mandamus relief from a trial court order denying a motion for judgment nunc pro tunc. Relator contends the trial court refused to correct a clerical error in an order granting nonsuit that dismissed both defendants and thus dismissed the entire case. Relator argues that the trial court was not authorized to dismiss the entire case because she claims she only nonsuited one of the two defendants. We conditionally grant the petition for writ of mandamus.

FACTUAL BACKGROUND

The Lawsuits
Relator Tonya Bridges, the mother of four minor children, sustained serious injuries in an automobile accident that left her paralyzed. She was the passenger in a car driven by Jerald Curtis, who was killed in the accident.
Bridges first sued Karla Barnhill, the owner of the automobile, in the 78th District Court of Wichita County (Hon. Keith Nelson), asserting that Barnhill negligently entrusted the automobile to Curtis. She later sued real-party-in-interest Graham Brothers Entertainment of Wichita Falls, L.L.C. ("Graham Brothers") in the 89 th District Court of Wichita County (Hon. Juanita Pavlick) under a dram shop theory.

Consolidation
Graham Brothers filed an unopposed motion to consolidate the two lawsuits. The motion was filed in both cases and expressly stated that the parties sought consolidation in the 78 th District Court. Graham Brothers' attorney testified by affidavit that the parties agreed to consolidate the cases in the 78 th District Court. Judge Nelson granted the motion and consolidated both cases into the 78th District Court.
Bridges's attorney contends that the parties had an oral agreement to consolidate the two cases into the 89 th District Court and that he was unaware they had been consolidated into the 78th. Bridges's attorney testified by affidavit that he received a written notice from the district clerk stating only that an "ORDER CONSOLIDATING" had been signed and filed. The notice informed the parties that the district clerk would not read the order to persons over the telephone, but they could read the order at the district clerk's office. Bridges's attorney did not go read the notice at the district clerk's office because it was 150 miles from his office and he thought the cases had been consolidated into the 89th District Court.
After the consolidation, the parties continued to file documents in both courts, but considerably more documents were filed in the 89 th District Court than in the 78 th District Court. These post-consolidation pleadings include Graham Brothers' cross claim against Karla Barnhill and its third-party action against the estate of Jerald Curtis, both of which were filed in the 89th District Court.

Nonsuits and Dismissals
Bridges filed two "Motion[s] for Non-Suit and Dismissal of All Claims." In the *193 style of the motion filed in the 78 th District Court, the typed "89 th" before the court designation is lined through and "78" is handwritten above it. The motion filed in the 78th states:
I.
Plaintiff, Tonya Bridges, asks the Court to enter a non-suit on all claims against Karla Barnhill.
II.
Plaintiff state [sic] that the parties have dismissed the lawsuit styled: Tonya Bridges v. Karla Barnhill without prejudice to the rights of either party.
Judge Nelson entered an "ORDER FOR NON-SUIT AND DISMISSAL OF ALL CLAIMS" that was drafted and approved as to form and content by Bridges's attorney. Again, in the style of the order, the typed "89 th" before the court designation is lined through and "78" is handwritten above it. The order states:
On Nov. 16, 1999, the Court considered the Motion for Non-suit and Dismissal of all Claims filed by Plaintiff, Tonya Bridges, and after considering the evidence and arguments of counsel, finds that the Motion should be GRANTED.
IT IS THEREFORE ORDERED that the Motion for Non-suit and Dismissal of all claims is GRANTED. The cause of action styled, Tonya Bridges v. Karla Barnhill, Cause No. 150,763-B is dismissed without prejudice to the rights of either party.
The motion Bridges filed in the 89th District Court states:
I.
Plaintiff, Tonya Bridges, asks the Court to enter a non-suit on all claims against Karla Barnhill.
II.
Plaintiff, Tonya Bridges, would inform the Court that she has filed a Motion for Non-Suit and Dismissal of all Claims in the case styled Tonya Bridges v. Karla Barnhill, Cause No. 150,763-B. A copy of the motion is attached as exhibit "A".
III.
Plaintiff would further state the case styled Tonya Bridges v. Karla Barnhill, Cause No. 150,763-B has been consolidated with the case styled Tonya Bridges v. Graham Brothers, [sic] Entertainment of Wichita Falls, LLC, [sic] et.al. [sic] pursuant to an order signed on September 30th, 1999 and filed October 1st, 1999.
IV.
Plaintiff would state she dismisses the lawsuit styled: Tonya Bridges v. Karla Barnhill which has been consolidated [sic] the case styled Tonya Bridges v. Grahams [sic] Brothers Entertainment of Wichita Falls L.L.C. et.al. [sic] Cause No. 150,996-C without prejudice to the rights of either party.
Judge Pavlick entered an "ORDER FOR NON-SUIT AND DISMISSAL OF ALL CLAIMS" that states:
On November 23, 1999 the Court considered the Motion for Non-suit and Dismissal of all Claims filed by Plaintiff, Tonya Bridges, and after considering the evidence and arguments of counsel, finds that the Motion should be GRANTED.
IT IS THEREFORE ORDERED that the Motion for Non-suit and Dismissal of all claims is GRANTED. The cause of action styled, Tonya Bridges vs. Karla Barnhill, Cause No. 150,763-B which has been consolidated with the case styled Tonya Bridges v. Graham Brothers Entertainment of Wichita Falls L.L.C. et. al. [sic] Cause No. 150,996-C is dismissed without prejudice to the rights of either party.


*194 Motion for Order Nunc Pro Tunc

On May 1, 2000, Judge Pavlick of the 89th District Court questioned which parties were actually before her after the consolidation in the 78 th District Court. Bridges's attorney claims that this was when the parties discovered that the case had been consolidated in the 78th District Court instead of the 89 th District Court.
On May 12, Bridges filed a motion in the 78th District Court asking Judge Nelson to "[r]eassign [t]he [c]ase [f]rom the 78th District Court to the 89th where the cause has been and was intended to be litigated by the [p]arties." In the alternative, in the same motion Bridges asked for a "[n]unc [p]ro [t]unc [order] to [c]orrect a[c]lerical [m]istake in the [r]ecord." The motion for a nunc pro tunc order sought correction of the consolidation order to consolidate the cases in the 89th District Court instead of the 78 th. On June 14, Bridges filed a supplemental response to Graham Brothers' response to her motion. In the supplemental response, Bridges asked Judge Nelson to enter an order nunc pro tunc to correct the order granting nonsuit and dismissing the case consolidated in the 78th District Court to reflect that only defendant Barnhill had been nonsuited and dismissed.
Judge Pavlick of the 89th District Court determined that she no longer had jurisdiction because the cases had been consolidated in the 78 th District Court. Meanwhile, on June 21st, Judge Nelson entered an order denying Bridges's motion to reassign and her motion for judgment nunc pro tunc. In that order, Judge Nelson held that the 78th District Court was without jurisdiction or plenary power to rule on the motion to reassign and that "all claims by the Plaintiff, Tonya Bridges, against Defendant Graham Brothers were dismissed by the November 16, 1999, order for non-suit." Bridges seeks mandamus relief from Judge Nelson's denial of her motion for a nunc pro tunc correction of the nonsuit and dismissal order entered in the 78th District Court.

DISCUSSION
In Shadowbrook Apartments v. Abu-Ahmad, the Texas Supreme Court held that a party may not appeal a trial court's denial of a motion for judgment nunc pro tunc because the appeal is not from a final judgment. 783 S.W.2d 210, 211 (Tex. 1990). The supreme court stated that it expressed no opinion about whether a party may be entitled to mandamus relief from the denial of a motion for judgment nunc pro tunc. See id.
Mandamus will issue only to correct a clear abuse of discretion or the violation of a duty imposed by law when there is no other adequate remedy at law. See Republican Party v. Dietz, 940 S.W.2d 86, 88 (Tex.1997) (orig.proceeding). Mandamus is appropriate to compel the performance of a judicial duty, particularly where the duty is ministerial. See General Motors Corp. v. Evins, 830 S.W.2d 355, 357 (Tex.App.-Corpus Christi 1992, orig. proceeding). Mandamus is also available to correct an order the trial court had no power to render. See McGough by and through Wonzer v. First Court of Appeals, 842 S.W.2d 637, 640 (Tex.1992) (orig.proceeding); Urbish v. 127 th Judicial Dist. Court, 708 S.W.2d 429, 431 (Tex.1986) (orig.proceeding); Gem Vending, Inc. v. Walker, 918 S.W.2d 656, 658 (Tex.App.-Fort Worth 1996, orig. proceeding).
A plaintiff has an absolute, unqualified right to nonsuit its own action against all or any of the defendants. See Tex.R. Civ. P. 162, 163; Shadowbrook Apts., 783 S.W.2d at 211; Greenberg v. Brookshire, 640 S.W.2d 870, 872 (Tex.1982) (per curiam). The right to a nonsuit exists at the moment a written motion is filed with the clerk of the court, and the granting of a nonsuit is merely a ministerial matter. See Shadowbrook Apts., 783 S.W.2d at 211; Greenberg, 640 S.W.2d at 872. A trial court is without authority to nonsuit parties without a motion for nonsuit *195 of those parties by the plaintiff. See Shadowbrook Apts., 783 S.W.2d at 211.
The motion for nonsuit filed in the 78th District Court is titled "MOTION FOR NON-SUIT AND DISMISSAL OF ALL CLAIMS." A motion's substance is not to be determined by its caption, however, but from the body and prayer for relief. See Lone Star Cement Corp. v. Fair, 467 S.W.2d 402, 404-05 (Tex.1971) (orig.proceeding); Abu-Ahmad v. Shadowbrook Apts., 776 S.W.2d 704, 708 (Tex. App.-Fort Worth 1989), rev'd on other grounds, 783 S.W.2d 210 (Tex.1990). In the body of the motion, Bridges asks the trial court to enter a nonsuit on "all claims against Karla Barnhill"; she does not mention her claims against Graham Brothers. She also states that the lawsuit styled "Tonya Bridges v. Karla Barnhill" is dismissed without prejudice to the rights of either party. The word "either" implies that there were only two parties, Bridges and Barnhill. If the claims against Graham Brothers were also included, then she would have presumably referred to the rights of all parties or any party.
Judge Nelson signed an order that was drafted and approved as to form and substance by Bridges's attorney. The order granted the motion for nonsuit and stated that the lawsuit filed in the 78th District Court was "dismissed without prejudice to the rights of either party." The granting of the nonsuit was not discretionary with the trial court and the signing of the dismissal order required no exercise of judicial reasoning. See Abu-Ahmad, 776 S.W.2d at 709.
Apparently, neither the trial court nor the parties realized at the time the order was signed that it could be construed to dismiss Bridges's claims against Graham Brothers, which had been consolidated with her claims against Barnhill in the 78th District Court. When Graham Brothers argued several months later that the order dismissed Bridges's claims against it, Bridges asked the court to correct the order to reflect that only the claims against Barnhill had been dismissed. The trial court refused.[1]
A trial court can enter a judgment nunc pro tunc to correct a clerical error at any time, even after it has lost jurisdiction over the case. See Tex.R. Civ. P. 316. This court has previously determined that a trial court commits a clerical error when it grants a motion for nonsuit and dismisses a defendant the plaintiff did not move to nonsuit. See Abu-Ahmad, 776 S.W.2d at 709. Such an order is void to the extent it purports or attempts to dismiss the lawsuit against a defendant who was not nonsuited. See id.
We conclude that Judge Nelson of the 78th District Court clearly abused his discretion when he refused to correct the clerical error in the order allegedly dismissing Bridges's claims against Graham Brothers. The trial court had a ministerial duty to enter an order granting nonsuit that was no broader in scope than the relief Bridges sought in her motion for nonsuit. Once it came to the court's attention that it had entered an order it was not authorized to enter because it dismissed a party who had not been nonsuited, the trial court had a duty to correct the erroneous order. Cf. Urbish, 708 S.W.2d at 431; Gem Vending, 918 S.W.2d at 658.
We also conclude that Bridges has no adequate remedy at law. She cannot appeal Judge Nelson's denial of her motion for an order nunc pro tunc correcting the dismissal order, see Shadowbrook Apartments, 783 S.W.2d at 211, and absent mandamus relief, she will lose a substantial right: the ability to pursue her claims against Graham Brothers. See Walker v. Packer, 827 S.W.2d 833, 839 (Tex.1992) *196 (orig.proceeding); Canadian Helicopters, Ltd. v. Wittig, 876 S.W.2d 304, 305 (Tex. 1994) (orig.proceeding).
Under the circumstances of this case, mandamus relief is available and appropriate.

CONCLUSION
The trial court abused its discretion by denying Bridges's motion for an order nunc pro tunc correcting a clerical error in the order granting nonsuit and dismissing all claims in the 78 th District Court. Bridges does not have an adequate remedy by appeal because the supreme court has expressly held that a party may not appeal the denial of a motion for judgment nunc pro tunc. Without an appeal, Bridges's right to pursue her claims against Graham Brothers will be irretrievably lost. Thus, we conditionally grant mandamus relief. We trust that the trial court will comply with this opinion; the writ will issue only if it fails to do so. We also deny Graham Brothers' motion to dismiss the petition for writ of mandamus as moot.
NOTES
[1]  After the petition for writ of mandamus was filed, Judge Nelson denied Bridges's motion for new trial and expressly stated in the order denying the motion for new trial that "the court is of the opinion that there was no clerical error in the entry of the November 16, 1999, Order for Non-suit and Dismissal of All Claims."
