Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

An INSERT EXEC statement cannot be nested error.
Hi,all,
When I use following sql, an error occurs:
insert into #tmprep
EXECUTE proc_stat @start,@end

There is a "select * from #tmp " in stored procedure proc_stat, and the
error message is :

Server: Msg 8164, Level 16, State 1, Procedure proc_stat, Line 42
An INSERT EXEC statement cannot be nested.

What's the metter? Any help is greatly appreciated. Thanks



Report this thread to moderator Post Follow-up to this message
Old Post
Scarab
11-28-05 08:24 AM


Re: An INSERT EXEC statement cannot be nested error.
Could you provide some code for use. A adhoc solution would be to
consider if you can use a UD(T)F for that to retrieve the data from.

HTH, jens Suessmeyer.


Report this thread to moderator Post Follow-up to this message
Old Post
Jens
11-28-05 08:24 AM


Re: An INSERT EXEC statement cannot be nested error.
Scarab (pest9998@hotmail.com)  writes:
> When I use following sql, an error occurs:
>     insert into #tmprep
>     EXECUTE proc_stat @start,@end
>
> There is a "select * from #tmp " in stored procedure proc_stat, and the
> error message is :
>
> Server: Msg 8164, Level 16, State 1, Procedure proc_stat, Line 42
> An INSERT EXEC statement cannot be nested.
>
> What's the metter? Any help is greatly appreciated. Thanks

Yes, that's a restriction with INSERT-EXEC. See this article for
alternative solutions: http://www.sommarskog.se/share_data.html.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Report this thread to moderator Post Follow-up to this message
Old Post
Erland Sommarskog
11-28-05 08:24 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 02:51 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006