RE: Urgent Help

RE: Urgent Help

 

  

It means that in IFMX_FeedInventory you have a statement that is in the form
of insert <table_name> exec <something something>. This is called a nested
exec and is not allowed

-----Original Message-----
From: Heraclio Cejas Corrales
[mailto:mssqldba-ezmlmshield-x77951495.[Email address protected]
Sent: Tuesday, December 26, 2006 10:51 AM
To: LazyDBA Discussion
Subject: Urgent Help

Hi All:

When I execute under Sql Server 2000 the following:

create table #saldo_alimento (
OperationUnitdID int ,
InternalCode varchar(20),
OperationUnitTypeID int,
OperationUnitTypeName varchar (30),
BirdType varchar(50),
Lotcode varchar(30),
FeedStorageID int,
Description varchar (50),
HourFeedDelivery int,
Active bit,
BalanceDate datetime,
FeedtypeID int,
FeedType varchar(50),
CloseBalance float,
TransportSheet int
)
declare @inicio varchar(8)
declare @termino varchar(8)
SELECT @inicio = CONVERT(char(8), Current_Timestamp, 112) +
Replace(Convert(char(5), Current_Timestamp, 114), ':','')
SELECT @termino = CONVERT( char(8), Current_Timestamp, 112) +
Replace(Convert(char(5), Current_Timestamp, 114),':','')

insert into #saldo_alimento
exec IFMX_FeedInventory @inicio, @termino

I receive the message:

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

(0 row(s) affected)

Thanks in advance.

Heraclio Cejas Corrales.

DBA Chile


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


MS Sql Server LazyDBA home page