Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An INSERT EXEC statement cannot be nested

Status
Not open for further replies.

rdharmar

IS-IT--Management
Jun 20, 2001
54
US
I'm trying to get the output values of a stored procedure into a table as below

Insert #temptable
Exec Stored_proc @param1, @parm2

I thought that this was possible but I get this error message.

"An INSERT EXEC statement cannot be nested."

Is this possible at all?
 
INSERT <table>
EXECUTE <proc>

is very much allowed. I think the problem is somewhere else. Do u have #temptable inside the proc also? Some such thing which may be causing a nesting issue?

RT
 
Thanks! You are right. I am using cursors and temp tables inside the stored proc and I too think the problem lies here. Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top