PRB: Error Creating Stored ProcedureLast reviewed: April 25, 1997Article ID: Q42624 |
The information in this article applies to:
- Microsoft SQL Server version 4.2 for OS/2
SYMPTOMSWhen using the following procedure as a stored procedure
Create procedure workshop as use pubs select * from authorsafter pressing CTRL+E in SAF, the error message "USE statement cannot be used in a stored procedure." Deleting the USE PUBS command returns the error message "Unknown object authors."
WORKAROUNDWhen using stored procedures, you must be in the database that you want the procedure to be executed in. This is also where the procedure should be created. You must first enter USE PUBS, then create the procedure. Now you can execute the procedure as long as you are in the "pubs" database.
|
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |