views:

45

answers:

0

Using SqlServer 2005. Here is the procedure code from a second stored procedure that calls the first one:

USE [SBS]; GO SET ANSI_NULLS ON; GO SET QUOTED_IDENTIFIER ON; GO CREATE PROCEDURE [dbo].[EU75_ALL_SP] WITH EXECUTE AS CALLER AS DECLARE @COLUMN_MAP_TEMP TABLE (COLUMN_VALUE varchar);

INSERT INTO @COLUMN_MAP_TEMP EXEC SBS.dbo.COLUMN_MAP_SP;

SELECT * FROM @COLUMN_MAP_TEMP; GO

When I run COLUMN_MAP_SP outside this stored procedure it returns 305 rows. But from within this stored procedure, the last SELECT statement returns zero rows. I have also tried SELECT COLUMN_VALUE FROM @COLUMN_MAP_TEMP, but it doesn't work either. There is more I want to add to this second stored procedure, but I need this part to work first. I am new to writing stored procedures, so I'm hoping it is something simple I am doing wrong.