Try:Create Procedure Main( @posting_date varchar(20) = '31 dec 2007', @period varchar(50) = null, @month_wid int = 0)As Begin Declare @Result Table (Period varchar(50), Month_Wid int) Insert Into @Result Exec Avg_Date_Check @posting_date, @period, @month_wid Select @posting_date, Period, Month_Wid From @ResultEndGoCreate Procedure Avg_Date_Check( @posting_date varchar(20), @period varchar(50), @month_wid int)As Begin --some logic Select '01 dec 2007 - 31 dec 2007', 200712 ReturnEnd