The information in this article applies to:
SYMPTOMS
The following SQL Server error (#2007) occurs when you try to
create a procedure, "add task," that is recursive on itself:
CAUSE
This error is produced when SQL Server attempts to normalize your
procedure to produce a query tree for future execution of your SQL
statements. Before your stored procedure is created, it does not
understand any reference to itself.
You can reference an object you've created in the same procedure as long as it is created before it is referenced. WORKAROUNDIf you need a single level of recursion only, this can be simulated by creating a separate procedure that has the same functionality. After it has been created, your first stored procedure can be modified to execute the second procedure when necessary.
Keywords : kbother SSrvStProc SSrvServer |
Last Reviewed: March 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |