Trial court has no authority, statutory or common law, to order transfer of a state prison inmate for investigative purposes. Inmate J.T., who was serving a state prison sentence for murder, was sought by the Culver City Police Department for a criminal investigation. The city obtained a court order for the temporary transfer of J.T. Warden Swarthout and the Attorney General opposed the transfer, and requested reconsideration of the order. After reviewing a sealed affidavit, the court again ordered the temporary transfer. The Court of Appeal issued a writ of mandate directing the trial court to vacate its order. There is statutory authority for the court to order the temporary transfer of an inmate to be tried for a felony (Pen. Code, § 2620) or as a material witness in a criminal matter (Pen. Code, § 2621). However, J.T.’s transfer was not sought for either of these purposes. Trial courts lack nonstatutory power to order transfers for other purposes for the following reasons: language in Supreme Court authority strongly suggests the lack of such authority (Payne v. Superior Court (1976) 17 Cal.3d 908); a statute confirming the courts’ inherent powers (Code Civ. Proc., § 187) does not apply where there is no existing judicial proceeding; and any inherent powers of the courts exist to allow them to carry out their judicial functions (Cal. Const., art. VI, § 1), not to facilitate executive functions, such as criminal investigations.