Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Insert exec

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-30 : 09:17:56
sowmya writes "I have a procedure usp_GetFeeLevels.This returns a recordset.
This proc uses "exec another proc" to insert data into one of its temp tables. When I execute usp_GetFeeLevels,I get my required result.
I call this usp_GetFeeLevels from another procedure usp_MainProc to Insert into a temp table in the main proc.
But when I executed this usp_MainProc, an error was listed saying that "Insert exec statement cannot be nested".
Can I not use Insert..exec statement in my sub-proc if I am using exec sub-proc in my main proc itself????Please explain.


Thank you!!!


regards,
Sowmya"

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-04-30 : 10:00:14
It's not that you can't use insert exec in a sub-proc, its that you can't use the same temp table name more than one in the same batch . . . (assuming my clairvoyance powers are still working correctly)

<O>
Go to Top of Page
   

- Advertisement -