
218 Cal.App.3d 1161 (1990)
267 Cal. Rptr. 348
THE PEOPLE, Plaintiff and Appellant,
v.
VICTOR ELIAS, Defendant and Respondent.
Docket No. C006014.
Court of Appeals of California, Third District.
March 1, 1990.
*1162 COUNSEL
John K. Van de Kamp, Attorney General, Richard B. Iglehart, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, Roger E. Venturi and Eddie T. Keller, Deputy Attorneys General, for Plaintiff and Respondent.
John P. Hannon, under appointment by the Court of Appeal, for Defendant and Respondent.
OPINION
DAVIS, J.
This is an appeal by the People based upon the superior court's dismissal of an information pursuant to Penal Code section 1387.[1] We shall reverse.
*1163 On August 19, 1988, the People filed complaint No. F-44986 in the municipal court charging defendant with grand theft (Pen. Code, § 487, subd. (1)). On August 26, complaint No. F-45050 was filed in the municipal court charging defendant with the same grand theft offense but adding two prior felony convictions.
On September 2, defendant was held to answer on the first filed complaint, complaint No. F-44986, and on September 7, based upon the holding order the district attorney filed information No. 42941 in the superior court.
On October 3, the superior court granted defendant's motion to dismiss the information pursuant to Penal Code section 995 and on October 4 the district attorney refiled the same grand theft charge as complaint No. F-45372.
At defendant's arraignment on complaint No. F-45372, complaint No. F-45050, which had been filed by a prosecutor other than the one who had filed complaint No. F-44986, was discovered; complaint No. F-45050 had never been acted upon. At the prosecutor's request, complaint No. F-45050 was dismissed as a duplicate filing.
Prior to the preliminary examination on complaint No. F-45372 defendant filed a motion to dismiss pursuant to Penal Code section 1387 (see fn. *1164 1), claiming there had been two dismissals of the action within the meaning of that section. The motion was denied and defendant was held to answer.
Based upon the new holding order the People filed information No. 43289 in the superior court. Defendant pled not guilty and again sought dismissal on Penal Code section 1387 grounds.
(1) At the hearing on the motion, the superior court concluded that the dismissal of complaint No. F-45050 came within the ambit of Penal Code section 1385, i.e., a dismissal in the interests of justice. Therefore, the court concluded, the action had been twice terminated within the meaning of Penal Code section 1387 and any further proceedings on the same action were barred.
It is obvious the prosecutor and the magistrate were merely attempting to dispose of the inadvertently filed duplicate complaint while still leaving the identical action intact and pending under the new complaint. Although there may be no statutory authorization for dismissing the duplicate complaint on the ground, as was done here, that it is a duplicate filing, such procedure does not convert the dismissal into one under Penal Code section 1385. Indeed, section 1385 was never mentioned by any of the parties or the magistrate at the time of the dismissal of the duplicate complaint. At worst, the dismissal was unauthorized and thus an act beyond the magistrate's jurisdiction, thereby rendering the dismissal a nullity, but in no event was the dismissal pursuant to section 1385.
A statutory procedure which would achieve the desired result of disposing of the duplicate complaint would be to consolidate the pleadings (Pen. Code, § 954) under the newly filed complaint number as two counts and then strike one count.
If the defendant and the trial court were correct in their application of Penal Code sections 1385 and 1387, absurd results could follow. A defendant charged with multiple homicides and against whom the evidence was overwhelming would never have to answer for his crimes if, by mistake, three duplicate complaints were filed against him because two of them would have to be dismissed in the supposed interest of justice, i.e., under section 1385. Since statutes are to be construed to effectuate their purpose (Landrum v. Superior Court (1981) 30 Cal.3d 1, 12 [177 Cal. Rptr. 325, 634 P.2d 352]) and not to produce an absurd result (People v. Colver (1980) 107 Cal. App.3d 277, 285 [165 Cal. Rptr. 614]), the purported dismissal of an inadvertent duplicate filing of a criminal complaint does not constitute a termination of the action within the meaning of either of sections 1385 or 1387.
*1165 The judgment is reversed; the superior court is directed to vacate its order dismissing information No. 43289 and to reinstate it.
Puglia, P.J., and Sims, J., concurred.
NOTES
[1]  Penal Code section 1387 provides: "An order terminating an action pursuant to this chapter, or Section 859b, 861, 871, or 995, is a bar to any other prosecution for the same offense if it is a felony or it is a misdemeanor charged together with a felony and the action has been previously terminated pursuant to this chapter, or Section 859b, 861, 871 or 995, or if it is a misdemeanor not charged together with a felony, except in those felony cases, or those cases where a misdemeanor is charged with a felony, where subsequent to the dismissal of the felony or misdemeanor the judge or magistrate finds that substantial new evidence has been discovered by the prosecution which would not have been known through the exercise of due diligence at or prior to the time of termination of the action or that the termination of the action was the result of the direct intimidation of a material witness, as shown by a preponderance of the evidence.

"An order terminating an action is not a bar to prosecution if a compliant is dismissed before the commencement of a preliminary hearing in favor of an indictment filed pursuant to Section 944 and the indictment is based upon the same subject matter as charged in the dismissed complaint, information, or indictment.
"However, if the previous termination was pursuant to Section 859b, 861, 871, or 995, the subsequent order terminating an action is not a bar to prosecution if:
"(a) Good cause is shown why the preliminary examination was not held within 60 days from the date of arraignment or plea.
"(b) The motion pursuant to Section 995 was granted because of any of the following reasons:
"(1) Present insanity of the defendant.
"(2) A lack of counsel after the defendant elected to represent himself or herself rather than being represented by appointed counsel.
"(3) Ineffective assistance of counsel.
"(4) Conflict of interest of defense counsel.
"(5) Violation of time deadlines based upon unavailability of defense counsel.
"(6) Defendant's motion to withdraw a waiver of the preliminary examination.
"(c) The motion pursuant to section 995 was granted after dismissal by the magistrate of the action pursuant to Section 871 and was recharged pursuant to Section 739." (Enacted 1872; Amended Stats. 1905, ch. 558, p. 724; Stats. 1951, ch. 1674; Stats. 1975, ch. 1069; Stats. 1980, ch. 938; Stats. 1981, ch. 854; Stats. 1982, ch. 637; Stats. 1984, ch. 924.)
