Nested Stored Procedure

You can nest stored procedures up to 32 levels.

Error

Msg 8164, Level 16, State 1, Procedure some_sp, Line 8
An INSERT EXEC statement cannot be nested.

It can't nest. If some_sp tries to call some_other_sp with INSERT-EXEC, you will get an error message. Thus, you can only have one INSERT-EXEC active at a time. This is a restriction in SQL Server.

Based on the requirement we can use OUTPUT parameter to pass data between SP.

Comments

  1. It was informative post.I think it's helpful for me & all.Thanks for sharing and keep in blogging... CA Firms | Warehouse Audit
    Customer Reconciliation

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Great Post! Thank you such a great amount for sharing. This pretty post, it was so great to peruse and helpful to enhance my insight as refreshed one, continue blogging... Continuous Transaction Monitoring
    Duplicate Payment Review
    AP Vendor Helpdesk

    ReplyDelete

Post a Comment

Popular Posts

Install Master Data Services (MDS)

Non-blocking, semi-blocking, and blocking transforms in SSIS

Design an appropriate storage solution, including hardware, disk, and file layout