Results 1 to 2 of 2

Thread: 8164 - An INSERT EXEC statement cannot be nested.

  1. #1
    Bob Guest

    8164 - An INSERT EXEC statement cannot be nested.

    Can anyone suggest a way around this?

    The error message appears when my sproc_1 which contains

    INSERT table_name_1 EXEC sproc_2

    calls to sproc_2 which contains the TSQL line

    INSERT table_name_2 EXEC sproc_3

    Thanks!

  2. #2
    Dale Shaw Guest

    8164 - An INSERT EXEC statement cannot be nested. (reply)

    CREATE Table #temp (...)

    INSERT @#temp EXEC sproc_3

    INSERT table_name_1 SELECT * FROM #temp

    DROP TABLE #Temp

    ?

    Dale


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •