You can do this by creating a User-Defined Function that returns a table.set nocount ongoif exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WorkingDaysAgo]') and xtype in (N'FN', N'IF', N'TF'))drop function [dbo].[WorkingDaysAgo]GOCREATE FUNCTION WorkingDaysAgo (@DATE datetime, @DaysAgo int)RETURNS datetimeASbegin RETURN(DateAdd(d,0-@DaysAgo,@DATE))endGOCreate table tmp ( RowID int identity(1,1) not null primary key clustered, Item varchar(20) not null, PriceChangeDate datetime null)insert tmp (Item, PriceChangeDate) values ('Toaster', NULL)insert tmp (Item, PriceChangeDate) values ('Sofa', '2002-04-05')insert tmp (Item, PriceChangeDate) values ('Chair', NULL)insert tmp (Item, PriceChangeDate) values ('Bed', '2002-04-15')insert tmp (Item, PriceChangeDate) values ('Hammer', '2002-04-25')insert tmp (Item, PriceChangeDate) values ('Saw', NULL)insert tmp (Item, PriceChangeDate) values ('Lamp', '2002-04-26')insert tmp (Item, PriceChangeDate) values ('Razor', '2002-04-27')goif exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PriceChangeItems]') and xtype in (N'FN', N'IF', N'TF'))drop function [dbo].[PriceChangeItems]GOCREATE FUNCTION PriceChangeItems (@Date datetime , @DaysAgo int)RETURNS @retPriceChangeItems Table ( RowID int not null primary key clustered, Item varchar(20) not null, PriceChangeDate datetime null )ASBEGIN DECLARE @StartDate datetime SELECT @StartDate = dbo.WorkingDaysAgo(@Date, @DaysAgo) Insert @retPriceChangeItems Select * from tmp (nolock) where PriceChangeDate >= @StartDate RETURNENDGO-- Example invocationDeclare @StartDate datetimeselect @StartDate = GetDate()SELECT * from dbo.PriceChangeItems (@StartDate, 7) as TheData-- this line does NOT work: must not be able to pass a function to a function?!?!?-- SELECT * from dbo.PriceChangeItems (GetDate(), 7) as TheDataGOdrop function [dbo].[WorkingDaysAgo]drop function [dbo].[PriceChangeItems]drop table tmp-- here is the outputRowID Item PriceChangeDate----------- -------------------- ----------------------- 5 Hammer 2002-04-25 00:00:00.0007 Lamp 2002-04-26 00:00:00.0008 Razor 2002-04-27 00:00:00.000