Hi I got this error.. pls helpon this..Msg 8164, Level 16, State 1, Procedure <sp_create>, Line 52An INSERT EXEC statement cannot be nested.MY code is...WHILE @INT <=ISNULL((SELECT COUNT(ID) FROM table),0) BEGIN SELECT @D_Part_No = D_Part_No FROM <Table> WHERE ID = @INT EXEC SP1 @D_Part_No,@MODEL_ID OUTPUT INSERT INTO #temp_get_forecast(period_id,period_name,forecast_data) EXEC SP2 @D_Part_No, @MODEL_ID SET @INT = @INT + 1 END
-------------------------R..